nhn / tui.image-editor

🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
http://ui.toast.com/tui-image-editor
MIT License
7.08k stars 1.3k forks source link

custom like [http://nhn.github.io/tui.image-editor/latest/tutorial-example02-useApiDirect]( Use api direct ) #598

Open CodeLines3 opened 3 years ago

CodeLines3 commented 3 years ago

custom like [http://nhn.github.io/tui.image-editor/latest/tutorial-example02-useApiDirect]( Use api direct )

using library method startDrawingMode, when I crop by mousemove event

this.instance!.startDrawingMode('CROPPER'); 捕获2 捕获4 捕获 捕获3

3 4

Originally posted by @maleSun in https://github.com/nhn/tui.image-editor/issues/501#issuecomment-847965516

and then apply method crop() is TypeError: _set of null from fabric.js line 9194 IMG_20210526_103420

IMG_20210526_104112

lja1018 commented 3 years ago

@maleSun Thank you for your report. The cause is that cropzone becomes null when removing cropzone from canvas on Line 270(cropper.js). I will resolve it. If you are in a hurry, please refer to example02 js.

stale[bot] commented 3 years ago

This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks!

stale[bot] commented 3 years ago

This issue will be closed due to inactivity. Thanks for your contribution!

odex21 commented 3 years ago

https://github.com/nhn/tui.image-editor/blob/c53ad079241402f6ac49479ff10a139943979ced/apps/image-editor/src/js/action.js#L650-L657

The submenu is detected here, resulting in the early execution of this.stopDrawingMode.

Emmm, a workaround is to manually set the subemenu to crop.

Toflyer commented 1 year ago

This problem seems to still exist