Added new range helpers for generating more usable trees for displaying #14
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.
Currently this will produce a tree with two types of node.
Full interface:
Example Range node:
The "Range" node contains the following:
isRangeLeaf
: if this range only contains canvaseslabel
: from the range itself, will be"Untitled"
if not founduntitled
: boolean, if it is untitled (for display)firstCanvas
: SpecificResource with optional selector of the first canvas, for navigation.items
: list of items inside the range.Example Canvas node:
Similar properties to the range, if you wanted to display each canvas. The label is grabbed from the canvas (if you use the helper with Vault).
It will also work with AV or regions, and use the normalized "SpecificResource" format, to make it easier to use.
In this example, the canvas ID is pulled out, but the range is
Untitled
and marked as untitled. The time selector is also pulled out. (Other helpers in the repo can be used to parse it further).