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

fix: group object delete after restore position (fix #356) #367

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

jinwoo-kim-nhn
Copy link
Contributor

@jinwoo-kim-nhn jinwoo-kim-nhn commented Mar 25, 2020

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

버그

다중 선택된 객체들을 백스페이스로 삭제 후 되돌리기(undo) 를 했을때 되돌려진 객체의 포지션이 정확하지 않음

버그원인

graphics.getActiveObjectIdForRemove 에서 멀티셀렉트된 객체들을 한번에 삭제하기위해 group을 만들어줄때 group의 포지션을 모름으로, 되돌릴때 x, y (0, 0)의 잘못된 포지션으로 되돌려줌

해결방법

삭제를 위한 group을 만들때 삭제되기 전의 오리지날 포지션을 정확히 넣어줌


Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

Copy link
Member

@junghwan-park junghwan-park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

완료입니다!

const removeGroupObjectId = graphics.getActiveObjectIdForRemove();
const removeGroupObject = graphics.getObject(removeGroupObjectId);

expect(removeGroupObject.left).toBe(5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo 했을 때 포지션 정보가 잘 나오는지 검증이 되나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트를 좀 보강해보겠습니다. 리뷰 감사합니다.ㅎㅎ

@dongsik-yoo
Copy link
Contributor

[03/31] 리뷰 완료합니다.

@jinwoo-kim-nhn jinwoo-kim-nhn changed the title fix: group object delete after restore position fix: group object delete after restore position (fix #356) Mar 31, 2020
@jinwoo-kim-nhn jinwoo-kim-nhn merged commit e22335d into master Mar 31, 2020
@jinwoo-kim-nhn
Copy link
Contributor Author

#356

HerlinMatos pushed a commit to EveryMundo/tui.image-editor that referenced this pull request Jul 2, 2020
* fix: group object delete after restore position

* apply codereview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants