-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editor unresponsive after undoing crop #519
Comments
@fjwong |
@ayappaP |
@lja1018 Thank you for looking into the matter. We are also hoping this can be fixed soon. 😃 At the moment, we've implemented a somewhat hacky workaround that seems to work for our case. const editorInstance = ... // Tui Image Editor instance
const graphics = editorInstance._graphics;
const canvas = graphics._canvas;
const { onObjectModified } = graphics._handler;
// Detach default 'object:modified' listener and replace it with our own
canvas.off('object:modified', onObjectModified);
canvas.on('object:modified', (event) => {
const { target } = event;
// Ignore all 'object:modified' events triggered by a cropzone.
if (target.type === 'cropzone') return;
// Use the original event handler otherwise.
onObjectModified(event);
}); |
Thanks a lot @fjwong !! I will try this. |
This worked for me. Thanks for your help @fjwong !! |
# Conflicts: # apps/image-editor/src/js/imageEditor.js
* 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
Describe the bug
The image editor is mostly unresponsive after cropping an image and then undoing twice.
This only happens if the cropping rectangle is resized at least once before cropping.
To Reproduce
Steps to reproduce the behavior:
Uncaught TypeError: Cannot read property 'set' of undefined
exception.Uncaught (in promise) The executing command state is locked.
exception.Expected behavior
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: