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: change the way corner type information is obtained (fix #118) #304

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

jinwoo-kim-nhn
Copy link
Contributor

@jinwoo-kim-nhn jinwoo-kim-nhn commented Jan 20, 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

Description

issue

원인

  • Object 리사이즈를 위해 컨트롤을 선택할경우 각 방향의 8개의 컨트롤중 어느것을 선택하여 리사이즈 중인지 판별하기 위하여 Object.__corner 값을 이용하여 판별함
  • 리사이즈중 마우스 포인터가 켄버스 영역을 벗어났다가 다시 돌아올경우 Object.__corner 값이 정상적인 값을 리턴하지 않고 0을 리턴하기 시작함
  • Object.__corner 값이 0을 리턴하면서 계산식이 잘못되어 cropzone이 켄버스 영역을 벗어나게됨

해결

  • 불안전한 Object.__corner값을 이용하지 않고 fabricjs개발자가 권장하는 scaling 핸들러의 fEvent.transform.corner 값을 통해 선택된 컨트롤을 판별하여 버그 없이 동작하게 함

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

@jinwoo-kim-nhn jinwoo-kim-nhn changed the title fix: change the way corner type information is obtained fix: change the way corner type information is obtained (fix #118) Jan 20, 2020
@dongsik-yoo
Copy link
Contributor

[01/21] 리뷰 완료입니다.수고 많으셨어요. 이미지 에디터의 사이다!

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.

리뷰 완료했습니다!! 고생 많으셨어요 👍

@jinwoo-kim-nhn jinwoo-kim-nhn merged commit b1eeca8 into master Jan 21, 2020
@jinwoo-kim-nhn jinwoo-kim-nhn deleted the fix/dropzoneResizeIncorrectPosition branch March 20, 2020 08:13
HerlinMatos pushed a commit to EveryMundo/tui.image-editor that referenced this pull request Jul 2, 2020
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