Open
Conversation
- 修复选中 Section 并选中内部节点时,拖动移动速度加倍的问题
- 修复嵌套 Section 移除子节点后,拖动父级 Section 导致速度加倍的问题
Bug 1: Section.move() 中跳过已选中的子元素,避免重复移动
Bug 2: convertSectionToTextNode() 中先移除旧引用再添加新 TextNode,
避免 updateReferences() 因 UUID 相同导致同一对象被添加两次
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复两个 Section 移动时速度叠加的 bug:
Bug 1: 选中 Section 并选中内部节点时,拖动移动速度加倍 #361
Section.move()会遍历所有子节点并调用child.move(),但已被选中的子节点也会被moveSelectedEntities()单独移动,导致移动两次Bug 2: 嵌套 Section 移除子节点后,拖动父级 Section 导致速度加倍
convertSectionToTextNode()中,先添加新的 TextNode 到父 Section,再删除旧 Section,但旧 Section 的引用仍在children数组中。updateReferences()根据 UUID 查找时,由于新旧对象 UUID 相同,导致 TextNode 被添加两次到children数组修复方案
1. Bug 1:在
Section.move()中跳过已被选中的子元素2. Bug 2:在
convertSectionToTextNode()中,先从父 Section 的 children 数组移除旧引用,再添加新的 TextNode修复前后对比
修复前
before.mp4
修复后
after.mp4