fix: incorrected event noti at cropzone (fixed #269) #308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
issue
원인
canvs.on('objectScale')
또는canvs.on('objectMoved')
이벤트가 일어난 후에 cropzone 객체가 객체의 포지션을 규칙에 맞게(cropzone 영역이 캔버스 영역 밖으로 못 벗어나게) 바꾸어 버림, 사용자는 바뀌기 전의 포지션 정보를 받으므로 오류로 인식하게 됨.해결
캔버스이벤트위임 기능
을 가지고 있으면, 이후의 이벤트는 전부 target객체(cropzone)에게 알아서 이벤트 시점에 맞게 이벤트를 발생시키도록 역할 위임