Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undoing selection changes causes selected objects to shift in screen #522

Closed
fjwong opened this issue Feb 4, 2021 · 2 comments
Closed
Labels

Comments

@fjwong
Copy link

fjwong commented Feb 4, 2021

Describe the bug
When you select two or more objects in canvas, and either move them or scale them, then hit 'Undo', the objects shift towards the lower right corner of the canvas.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://nhn.github.io/tui.image-editor/latest/tutorial-example02-useApiDirect
  2. Draw any two objects.
  3. Click 'Close' to go back to selection mode.
  4. Drag a square to select both objects.
  5. Move or scale the object selection.
  6. Click 'Undo'
  7. The selected objects are shifted to the lower right, instead of going back to the previous state.

Expected behavior

  • Objects in the selection are returned to their previous state when undoing the changes.

Screenshots

Two objects drawn in canvas:
Screen Shot 2021-02-04 at 15 25 20

After selection and scaling:
Screen Shot 2021-02-04 at 15 25 33

After clicking 'Undo' (Note that the selection rectangle stays in the same position):
Screen Shot 2021-02-04 at 15 25 48

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: Chrome
  • Version: 88.0.4324.96 (Official Build) (x86_64)

Additional context
If you deselect the objects after step 5, and click 'Undo', the problem does not happen.

@fjwong fjwong added the Bug label Feb 4, 2021
@lja1018
Copy link
Contributor

lja1018 commented Feb 10, 2021

@fjwong
I understand this issue. Thank you for your detailed report. I'll handle it.

lja1018 added a commit that referenced this issue Mar 5, 2021
* feat: add history feature (#544)

* feat: add history element

* feat: add history list element, event listener

* feat: add history, panel menu component

* test: add history component test

* chore: remove default history

* refactor: constant classname

* feat: add history by action

* feat: add multiUndo, multiRedo

* chore: apply api review

* chore: apply detail history

* chore: add execution command event

* chore: add mask history

* chore: select load image history when init history

* chore: apply code review

* fix: list scroll position is bottom when list element added

* feat: add help toolbar

* chore: add help menus const

* chore: add history icon svg file

* chore: add toggle history menu

* chore: add list, panel, item style

* chore: add history action icon

* chore: change history title type

* chore: add history template html

* chore: resolve detail history information

* chore: resolve tooltip position with helpmenubar position

* test: fix broken test

* chore: add 3 history icons

* refactor: apply history name constants

* chore: apply alias

* chore: not toggle when history menu clicked

* fix: save undo data when text added (#545)

* fix: group selection object position when undo, redo in API direct page (#522) (#546)

* fix: fire object modified event when cropzone changed [#519] (#547)

* fix: not fire object modified event when cropzone is modified [#519]

# Conflicts:
#	apps/image-editor/src/js/imageEditor.js

* refactor: apply const

# Conflicts:
#	apps/image-editor/src/js/imageEditor.js

* fix: resize cropzone with ratio by pressing shift key (#548)

* fix: save undo data when text added [#545]

* test: resolve broken tests
@lja1018
Copy link
Contributor

lja1018 commented Mar 10, 2021

@fjwong
Thanks for the report. Resolved in v3.13.0.

@lja1018 lja1018 closed this as completed Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants