ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 753 forks source link

Moving layer's canvas offsets touch drag position #1046

Closed eric79 closed 9 years ago

eric79 commented 9 years ago
  1. Create a stage
  2. Add a layer to it
  3. Add a draggable object to that layer
  4. Dynamically change the position of the layer's canvas DOM element
  5. Try to drag the object with the mouse (works fine)
  6. Try to drag the object using touch (the touch point is offset by the amount the canvas was moved)

See this fiddle

The touch point is 50px above the polygon.

lavrton commented 9 years ago

I don't think this is a bug. Moving canvas from kinetic container is unexpected behaviour.

eric79 commented 9 years ago

Okay ... it was just interesting that it worked with the mouse, but not with touch.