Initial work on Auto Reference feature

This commit is contained in:
Brenden Harrell committed 2021-07-23 21:58:51 -05:00
1 parent 6efa918487
commit d9ec0c8c49
2 files changed
+35 -1

No files matched your search

@@ -259,13 +259,25 @@ function newFoundationsFunctionLibraryProtocolNode() {
name: node.payload.referenceParent.name,
id: node.payload.referenceParent.id
}
// If the path has not been saved save it now
if (node.payload.referenceParentCombinedNodePath === undefined) {
let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(node.payload.referenceParent)
// Save path to reference parent for auto restore
savedPayload.referenceParentCombinedNodePath = { path: attachNodePath }
} else {
// Save path to reference parent for auto restore
savedPayload.referenceParentCombinedNodePath = { path: node.payload.referenceParentCombinedNodePath }
}
} else {
/* The referenceParent property can be inherited from the previous saved payload. */
if (node.savedPayload !== undefined) {
savedPayload.referenceParent = node.savedPayload.referenceParent
// Save path to reference parent for auto restore
savedPayload.referenceParentCombinedNodePath = node.payload.referenceParentCombinedNodePath
}
}
}
console.log("this is the saved payload", savedPayload)
return savedPayload
}
}