-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(edgeless): element tree manager (#8239)
### TL;DR This PR introduces `TreeManager` to maintain the container-children relationship among `GfxModel`s. This change can make sure an element only has zero or one container. ### What changes: - A new `TreeManager` is introduced to maintain the container-children relationship. Its implementation references the relevant code previously used in group in `surface-model.ts`. - Removed code related to the container-children relationship watcher of group. - The `ContainerElement` interface and related code have been moved from `element-model.ts` to a new file, `container-element.ts`. - Simplified the implementation of the `ContainerElement` interface in `GroupLikeModel` and `FrameModel`. - Some type annotation changes: from `BlockSuite.EdgelessModel` to `GfxModel`. ### About test: The existing tests already cover the changes mentioned above, including the relationship changes after operations on the child elements of frames and groups.
- Loading branch information
Showing
26 changed files
with
540 additions
and
355 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.