Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

fix: add data to snapshot #88

Merged
merged 5 commits into from
Feb 20, 2020
Merged

fix: add data to snapshot #88

merged 5 commits into from
Feb 20, 2020

Conversation

Caele
Copy link
Collaborator

@Caele Caele commented Feb 19, 2020

The snapshot now only stores the data it needs, which is the nodes you see, plus their children (to get the numbers right, bit of a shortcut).

src/tree/render.js Outdated Show resolved Hide resolved
@@ -155,7 +154,7 @@ export default function supernova(env) {
* - render [allNodes, positioning, styling, rect]
*/

usePromise(() => {
const [dataTree] = usePromise(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was likely not needed, but removes a state for us.

@@ -181,11 +186,11 @@ export function createNodes(matrix, attributeIndecies, status, navigationMode, t
const parentNode = nodeMap[node.parentId];
node.parent = parentNode;
if (parentNode) {
parentNode.children.length > 100
parentNode.children.length > 98
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to 98, so that the max number of children becomes 99, which fits in the +/- box.

@Caele Caele merged commit 4dd9621 into master Feb 20, 2020
@Caele Caele deleted the tsm/story branch February 20, 2020 07:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants