Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Drag & Drop not working properly on iPad (canvas/html5)

Community Beginner ,
Nov 08, 2016 Nov 08, 2016

I want to create a simple drag & drop exercise, but on the iPad "drag & drop" is not working properly.

Here is the code:

var that = this;

createjs.Touch.enable(stage);

stage.enableMouseOver(10);

function initPage() {

  var shape = new createjs.Shape();

  shape.graphics.beginFill("#999999").drawRoundRect(100,100,140,60,8).endFill();

  shape.on("mousedown", function(evt) {

    this.alpha = 0.8;

    this.offset = {x: this.x - evt.stageX, y: this.y - evt.stageY};

  });

  shape.on("pressmove", function(evt) {

    this.x = evt.stageX + this.offset.x;

    this.y = evt.stageY + this.offset.y;

  });

  shape.on("pressup", function(evt) {

    this.alpha = 1;

  });

  that.addChild(shape);

}

initPage();

I can drag the shape, but the more I move it, the more it moves away from my finger. Here is a video I just recorded:

https://dl.dropboxusercontent.com/u/11697167/animatecc-bug.mp4

Any ideas what is wrong?

Edit:

Ok it seems the problem lies within the "makeResponsive" function which is part of the default HTML template.

Problem is, if I deactivate it the resolution on the Retina iPad is much worse (but drag & drop is working).

@Adobe, please release a bugfix asap

620
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation