(node: LiveVariableNode)
| 140 | } |
| 141 | |
| 142 | public moveDownChild(node: LiveVariableNode): boolean { |
| 143 | if (!node || !node.isRootChild()) { return false; } |
| 144 | let ix = 0; |
| 145 | const last = this.children ? this.children.length - 1 : -1; |
| 146 | for (const child of this.children || []) { |
| 147 | if (child.name === node.name) { |
| 148 | if (ix !== last) { |
| 149 | const next = this.children[ix + 1]; |
| 150 | this.children[ix] = next; |
| 151 | this.children[ix + 1] = child; |
| 152 | } else { |
| 153 | const last = this.children.pop(); |
| 154 | this.children.unshift(last); |
| 155 | } |
| 156 | return true; |
| 157 | } |
| 158 | ix++; |
| 159 | } |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | public reset(valuesToo = true) { |
| 164 | this.session = undefined; |
no test coverage detected