GDevelop
GDevelop copied to clipboard
The instance editor shift instaces after dragging one outside of the view
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:
- Select an instance
- Drag it outside of the view (outside of the windows work too but it's probably a different issue)
- After a bit with no apparent reason PIXI doesn't send
mousemove
events to pixi-simple-gesture - Release the mouse inside the instance editor view (probably work if released outside too)
- Unzoom to see the instance that staid outside
- It's still following the mouse even though the button is released
- The instance moves with a wrong offset
- 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:
- Select an instance
- Drag it outside of the view (outside of the windows work too but it's probably a different issue)
- After a bit with no apparent reason PIXI doesn't send
mousemove
events to pixi-simple-gesture - Release the mouse inside the instance editor view (probably work if released outside too)
- Drag another instance directly (without selecting)
- The instance is shift instantly
- 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.