0

I've tried this with both jCanvas and KineticJS. When an added image is made draggable:

var image = new Kinetic.Image({
  image: imageObj,
  id: imageName,
  x: parseInt(CoordX),
  y: parseInt(CoordY),
  draggable: true
});

The canvas/stage become unresponsive for clicks on an iPad. The only place where it recognises click/tap is on the border.

Has anyone faced similar issue and how did you resolve this?

1 Answers1

0

UPDATE: @user1950497, for jCanvas, the key to making an image draggable is to make sure to set the layer property to true (http://jsfiddle.net/dksmiffs/YdPpy/):

$("canvas").drawImage({
  source: "http://upload.wikimedia.org/wikipedia/commons/thumb/d/d8/Gadsden_flag.svg/320px-Gadsden_flag.svg.png",
  x: 200, y: 150,
  layer: true,
  draggable: true
});

Thanks to @Caleb531 who guided me to the answer in jCanvas issue #74.

dave_k_smith
  • 655
  • 1
  • 7
  • 22