fix: Componnent will reset when select of drag

This commit is contained in:
2025-05-17 15:49:54 +08:00
parent 3fb59af2dd
commit c7907b4253
3 changed files with 18 additions and 13 deletions

View File

@@ -564,14 +564,14 @@ function onComponentDrag(e: MouseEvent) {
);
// 更新这些组件的位置
// for (const groupComp of groupComponents) {
// diagramData.value = updatePartPosition(
// diagramData.value,
// groupComp.id,
// groupComp.x + deltaX,
// groupComp.y + deltaY,
// );
// }
for (const groupComp of groupComponents) {
diagramData.value = updatePartPosition(
diagramData.value,
groupComp.id,
groupComp.x + deltaX,
groupComp.y + deltaY,
);
}
}
// 通知父组件位置已更新