(exist, add)
| 142 | } |
| 143 | |
| 144 | insertAfter(exist, add) { |
| 145 | let existIndex = this.index(exist) |
| 146 | let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse() |
| 147 | existIndex = this.index(exist) |
| 148 | for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node) |
| 149 | |
| 150 | let index |
| 151 | for (let id in this.indexes) { |
| 152 | index = this.indexes[id] |
| 153 | if (existIndex < index) { |
| 154 | this.indexes[id] = index + nodes.length |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | this.markDirty() |
| 159 | |
| 160 | return this |
| 161 | } |
| 162 | |
| 163 | insertBefore(exist, add) { |
| 164 | let existIndex = this.index(exist) |
no test coverage detected