Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export class SectionInOutManager {
// 获取section的父级section
const fatherSections = this.project.sectionMethods.getFatherSections(section);

// 先从父 section 的 children 中移除旧的 section 引用(直接操作数组,避免触发 sectionDropChild 的连锁反应)
for (const fatherSection of fatherSections) {
fatherSection.children = fatherSection.children.filter((child) => child.uuid !== section.uuid);
}

// 创建新的TextNode,保持UUID不变
const textNode = new TextNode(this.project, {
uuid: section.uuid, // 保持UUID不变
Expand Down
4 changes: 4 additions & 0 deletions app/src/core/stage/stageObject/entity/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ export class Section extends ConnectableEntity {
}
// 让内部元素也移动
for (const child of this.children) {
// 跳过已被选中的子元素,避免重复移动(解决速度叠加bug)
if (child.isSelected) {
continue;
}
child.move(delta);
}

Expand Down