-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core/Canvas): make truely multi-root aware
This adds the capability to add multiple root elements to the Canvas. As a side-effect, it drops our leaky plane abstraction from the public API. The following `Canvas` APIs make the magic happen: * `Canvas#addRootElement` - add a root element without showing it * `Canvas#removeRootElement` - remove a root element * `Canvas#setRootElement` - set to a specific root element; for backwards compatibility the add-during-set semantic is kept * `Canvas#getRootElements` - returns a list of root elements that can be switched to Under the hood we continue to rely on root element specific layers. However, we clean these layers up once the root element is removed. Closes #600 BREAKING CHANGES: * All plane related APIs got removed, use the newly introduced `(add|set)RootElement` APIs to accomplish the same thing. * INTERNAL: Every root element gets it's own layer now; there is no magic re-use of the BASE_LAYER happening anymore. * `setRootElement` does not have single root semantics anymore. As such, it does not blow up if a non-existing root is being passed; rather, it adds that new root and shows it. * `setRootElement` has on `override` semantics anymore. To replace the current root, set a new root and remove the old one.
- Loading branch information
Showing
8 changed files
with
414 additions
and
1,024 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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.