Added navigation to top/bottom, normalized toplevel node parent to root node
This commit is contained in:
parent
8192f49558
commit
e276e6d156
3 changed files with 54 additions and 11 deletions
|
|
@ -336,7 +336,13 @@ export class Node {
|
|||
this.data = nodeData
|
||||
|
||||
this.UUID = nodeData.UUID
|
||||
this.ParentUUID = nodeData.ParentUUID
|
||||
|
||||
// Toplevel nodes are normalized to have the ROOT_NODE as parent.
|
||||
if (nodeData.UUID !== ROOT_NODE && nodeData.ParentUUID === '') {
|
||||
this.ParentUUID = ROOT_NODE
|
||||
this.data.ParentUUID = ROOT_NODE
|
||||
} else
|
||||
this.ParentUUID = nodeData.ParentUUID
|
||||
|
||||
this._children_fetched = false
|
||||
this.Children = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue