GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

The instance editor shift instaces after dragging one outside of the view

Open D8H opened this issue 2 years ago • 0 comments

Describe the bug

After dragging one instance outside of the view, the editor no longer move instances correctly. Sometimes it can appear as if selected instances disappear (but they just go far from the screen).

To Reproduce

Steps to reproduce the behavior:

  1. Select an instance
  2. Drag it outside of the view (outside of the windows work too but it's probably a different issue)
  3. After a bit with no apparent reason PIXI doesn't send mousemove events to pixi-simple-gesture
  4. Release the mouse inside the instance editor view (probably work if released outside too)
  5. Unzoom to see the instance that staid outside
  6. It's still following the mouse even though the button is released
  7. The instance moves with a wrong offset
  8. When the instance move outside of the view, PIXI doesn't send mousemove events even though the mouse is still in the instance editor view.

pan.js

  function move(e, t) {
    var now = new Date();
    var interval = now - sprite._pan.p.date;
    console.log("move: " + interval);

LayerRenderer.js

        console.log("Move " + instance.getZOrder() + ": " + event.deltaX + " " + event.deltaY);
        this.onMoveInstance(instance, event.deltaX, event.deltaY);

https://user-images.githubusercontent.com/2611977/181732977-fb7fc525-9cc3-41af-86f3-8300eeb00298.mp4

Steps to reproduce the behavior:

  1. Select an instance
  2. Drag it outside of the view (outside of the windows work too but it's probably a different issue)
  3. After a bit with no apparent reason PIXI doesn't send mousemove events to pixi-simple-gesture
  4. Release the mouse inside the instance editor view (probably work if released outside too)
  5. Drag another instance directly (without selecting)
  6. The instance is shift instantly
  7. Looking at the logs, the 1st instance dragging never stopped

https://user-images.githubusercontent.com/2611977/181733002-e8e2ca98-d95b-4969-b911-764e5efc8015.mp4

Other details

  • GDevelop 5.0.139

Insights

  • As PIXI seems to be the root cause. I guess not much that can be done until we try with the last PIXI version.

D8H avatar Jul 29 '22 10:07 D8H