fix: do not undo when is inverting
This commit is contained in:
@@ -453,7 +453,11 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleUndoShortcut = (e: KeyboardEvent) => {
|
const handleUndoShortcut = (e: KeyboardEvent) => {
|
||||||
if ((e.ctrlKey || e.metaKey) && e.key === 'z') {
|
if (
|
||||||
|
(e.ctrlKey || e.metaKey) &&
|
||||||
|
e.key === 'z' &&
|
||||||
|
!negativeMaskRef.current
|
||||||
|
) {
|
||||||
undo();
|
undo();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user