Fix middle alignment of preview design.
This commit is contained in:
Vendored
+11
-2
@@ -11554,6 +11554,10 @@ function DesignPreview({
|
||||
});
|
||||
const [opacity, setOpacity] = react.exports.useState(100);
|
||||
const keyDownHandler = react.exports.useCallback(function (e) {
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
|
||||
const step = e.shiftKey ? 10 : 1;
|
||||
|
||||
if (e.key === 'ArrowUp') {
|
||||
@@ -11573,13 +11577,18 @@ function DesignPreview({
|
||||
x: step
|
||||
}, true);
|
||||
}
|
||||
}, [position]);
|
||||
}, [position, active]);
|
||||
react.exports.useEffect(() => {
|
||||
document.addEventListener('keydown', keyDownHandler);
|
||||
return () => {
|
||||
document.removeEventListener('keydown', keyDownHandler);
|
||||
};
|
||||
}, [keyDownHandler]);
|
||||
react.exports.useEffect(() => {
|
||||
updatePosition({
|
||||
x: getInitialXPosition(previewOption)
|
||||
});
|
||||
}, [previewOption.widthDimension]);
|
||||
|
||||
if (!previewOption) {
|
||||
return;
|
||||
@@ -11706,7 +11715,7 @@ function DataOptions(props = {}) {
|
||||
})();
|
||||
}
|
||||
}, []);
|
||||
react.exports.useEffect(async () => {
|
||||
react.exports.useEffect(() => {
|
||||
document.addEventListener("keydown", handleCloseSidebarEscEvent); // Unsubscribe from ESC listener.
|
||||
|
||||
return () => {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user