Method
constructor
(id, data, domNode, parent, metadata, type)
Source from the content-addressed store, hash-verified
| 230 | |
| 231 | export class TreeNode { |
| 232 | constructor(id, data, domNode, parent, metadata, type) { |
| 233 | this.id = id; |
| 234 | this.data = data; |
| 235 | this.setParent(parent); |
| 236 | this.children = []; |
| 237 | this.domNode = domNode; |
| 238 | this.metadata = metadata; |
| 239 | this.name = metadata ? metadata.data.label : ''; |
| 240 | this.type = type || undefined; |
| 241 | } |
| 242 | |
| 243 | hasParent() { |
| 244 | return this.parentNode !== null && this.parentNode !== undefined; |
Callers
nothing calls this directly
Tested by
no test coverage detected