Open joaograca opened 10 years ago
Having the same issue. Please resolve
Not sure if anyone is still watching this issue, but I have a potential solution.
in the function addEvent on line ~3096, there is a check for touch support that adds an event listener that is not tracked and therefor cannot be removed. Above addEvent, I created an array touchable = [] then track it where it is added
touchable.push({ el: obj, start: _f }); obj.addEventListener(touchMap[type], _f, false);
Then in the undrag function line ~3637, I remove it while (i--) if (draggable[i].el == this) { this.unmousedown(draggable[i].start); draggable.splice(i, 1); touchable[i].el.removeEventListener("touchstart", touchable[i].start, false); touchable.splice(i, 1); eve.unbind("raphael.drag.*." + this.id); }
Not sure if this is everything that needs to be done, but it has greatly helped my app.
Good luck
I need to support touch drag in a project so I saw this example http://raphaeljs.com/touches.html When I call Raphael's undrag the set is undraggable with mouse but still draggable with touch.
Quick example: