Canvas drag and drop with touch
i created drag , drop touchstart don't work.
var cl = this.cl; createjs.touch.enable(stage); cl.addeventlistener("touchstart", ontouch.bind(cl)); function ontouch(e) { thiscl.addchild(activecl); canvas.addeventlistener('touchmove', movetouch); canvas.addeventlistener("touchend", mup); } function mup() { canvas.removeeventlistener('mousemove', move); canvas.addeventlistener('touchmove', movetouch); } function move() { cl.x = stage.mousex; cl.y = stage.mousey; }
i'm not sure if issue still case:
touchstart callback doesn't work · issue #465 · createjs/easeljs · github
does work better if use mousedown or pressed? worth reading article:
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment