|
|
@ -11554,6 +11554,10 @@ function DesignPreview({ |
|
|
}); |
|
|
}); |
|
|
const [opacity, setOpacity] = react.exports.useState(100); |
|
|
const [opacity, setOpacity] = react.exports.useState(100); |
|
|
const keyDownHandler = react.exports.useCallback(function (e) { |
|
|
const keyDownHandler = react.exports.useCallback(function (e) { |
|
|
|
|
|
if (!active) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const step = e.shiftKey ? 10 : 1; |
|
|
const step = e.shiftKey ? 10 : 1; |
|
|
|
|
|
|
|
|
if (e.key === 'ArrowUp') { |
|
|
if (e.key === 'ArrowUp') { |
|
|
@ -11573,13 +11577,18 @@ function DesignPreview({ |
|
|
x: step |
|
|
x: step |
|
|
}, true); |
|
|
}, true); |
|
|
} |
|
|
} |
|
|
}, [position]); |
|
|
}, [position, active]); |
|
|
react.exports.useEffect(() => { |
|
|
react.exports.useEffect(() => { |
|
|
document.addEventListener('keydown', keyDownHandler); |
|
|
document.addEventListener('keydown', keyDownHandler); |
|
|
return () => { |
|
|
return () => { |
|
|
document.removeEventListener('keydown', keyDownHandler); |
|
|
document.removeEventListener('keydown', keyDownHandler); |
|
|
}; |
|
|
}; |
|
|
}, [keyDownHandler]); |
|
|
}, [keyDownHandler]); |
|
|
|
|
|
react.exports.useEffect(() => { |
|
|
|
|
|
updatePosition({ |
|
|
|
|
|
x: getInitialXPosition(previewOption) |
|
|
|
|
|
}); |
|
|
|
|
|
}, [previewOption.widthDimension]); |
|
|
|
|
|
|
|
|
if (!previewOption) { |
|
|
if (!previewOption) { |
|
|
return; |
|
|
return; |
|
|
@ -11706,7 +11715,7 @@ function DataOptions(props = {}) { |
|
|
})(); |
|
|
})(); |
|
|
} |
|
|
} |
|
|
}, []); |
|
|
}, []); |
|
|
react.exports.useEffect(async () => { |
|
|
react.exports.useEffect(() => { |
|
|
document.addEventListener("keydown", handleCloseSidebarEscEvent); // Unsubscribe from ESC listener.
|
|
|
document.addEventListener("keydown", handleCloseSidebarEscEvent); // Unsubscribe from ESC listener.
|
|
|
|
|
|
|
|
|
return () => { |
|
|
return () => { |
|
|
|