diff --git a/src/hooks/module/useModule.js b/src/hooks/module/useModule.js index c6ca9ba3..e4e783e9 100644 --- a/src/hooks/module/useModule.js +++ b/src/hooks/module/useModule.js @@ -362,7 +362,7 @@ export function useModule() { } modules.forEach((module) => { - const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), false) + const { top, left } = getPosotion(module, direction, Number(length) + Number(moduleLength), true) module.clone((obj) => { obj.set({ parentId: module.parentId, @@ -689,7 +689,7 @@ export function useModule() { targetModules.forEach((module) => { if (width === -1) width = type === MODULE_INSERT_TYPE.LEFT ? Number(activeModule.left) - Number(module.left) : Number(module.left) - Number(activeModule.left) - const { top, left } = getPosotion(module, type, module.width, false) + const { top, left } = getPosotion(module, type, module.width, true) module.originPos = { left: module.left, top: module.top, @@ -706,7 +706,7 @@ export function useModule() { canvas.renderAll() otherModules = getOtherModules(columnModules) columnModules.forEach((module) => { - const { top, left } = getPosotion(module, type, module.width, false) + const { top, left } = getPosotion(module, type, module.width, true) let copyModule = null module.clone((obj) => { obj.set({ @@ -807,7 +807,7 @@ export function useModule() { targetModules.forEach((module) => { if (height === -1) height = type === MODULE_INSERT_TYPE.TOP ? Number(activeModule.top) - Number(module.top) : Number(module.top) - Number(activeModule.top) - const { top, left } = getPosotion(module, type, activeModule.height, false) + const { top, left } = getPosotion(module, type, activeModule.height, true) module.originPos = { left: module.left, top: module.top, @@ -823,7 +823,7 @@ export function useModule() { canvas.renderAll() otherModules = getOtherModules(rowModules) rowModules.forEach((module) => { - const { top, left } = getPosotion(module, type, activeModule.height, false) + const { top, left } = getPosotion(module, type, activeModule.height, true) let copyModule = null module.clone((obj) => { obj.set({