diff --git a/packages/editor/src/utils/editor.ts b/packages/editor/src/utils/editor.ts index 3e924fc0..0ed95d59 100644 --- a/packages/editor/src/utils/editor.ts +++ b/packages/editor/src/utils/editor.ts @@ -378,11 +378,11 @@ export const fixNodePosition = (config: MNode, parent: MContainer, stage: StageC const style = { ...(config.style || {}) }; const baseStyle = config.style || {}; - if ('left' in baseStyle && !('right' in baseStyle)) { + if (!('right' in baseStyle)) { style.left = fixNodeLeft(config, parent, stage?.renderer?.contentWindow?.document); } - if ('top' in baseStyle && !('bottom' in baseStyle)) { + if (!('top' in baseStyle) && !('bottom' in baseStyle)) { style.top = getMiddleTop(config, parent, stage); }