phaserjs / phaser-editor-issues

Phaser Editor's bug tracker.
0 stars 0 forks source link

Inserted elements receive incorrect XY coordinates #36

Closed Ariorh1337 closed 2 months ago

Ariorh1337 commented 2 months ago

Version

Description

Game elements after copying and pasting receive the coordinates of the upper left corner of the visible grid. Can be easy reproduced inside demo: https://editor.phaser.io/?trial=sunny-land

  1. Open sunny-land
  2. Choose any element
  3. Press CTRL+C
  4. Press CTRL+V

Actual Result:

Expected Result:

Possible solution

PhaserEditor2D commented 2 months ago

Try with Ctrl+Shift+V to paste the object with the same XY.

Ariorh1337 commented 2 months ago

it really worked with "Ctrl+Shift+V" it looks like swapping the functionality of "Ctrl+Shift+V" with "Ctrl+V" would be more logical, not sure how often someone might need to paste something into the corner of the screen. I would agree more if the object was inserted into the center of the screen and not into the corner

PhaserEditor2D commented 2 months ago

Well, why is it inserted in the corner of the screen? It should be inserted under the cursor.

https://github.com/user-attachments/assets/d8f20078-9a2f-4187-9627-2b3cf903506b

Can you share a video with the bug?

Ariorh1337 commented 2 months ago

this behavior was not obvious to me 😯 everything is as you said, the element is inserted on the mouse cursor