@@ 160-164 (lines=5) @@ | ||
157 | ||
158 | if ($this->node->{$this->leftAttribute} > $compareRight) { |
|
159 | //move node up |
|
160 | if ($position == 0) { |
|
161 | $leftFrom = $this->parent->{$this->leftAttribute} + 1; |
|
162 | } else { |
|
163 | $leftFrom = $newPrevSiblingData[$newPrevSiblingId][$this->rightAttribute] + 1; |
|
164 | } |
|
165 | $rightTo = $this->node->{$this->leftAttribute}; |
|
166 | $nodeDelta = $this->node->{$this->leftAttribute} - $leftFrom; |
|
167 | $nodeOperator = '-'; |
|
@@ 174-178 (lines=5) @@ | ||
171 | } else if ($this->node->{$this->leftAttribute} < $compareRight) { |
|
172 | //move node down |
|
173 | $leftFrom = $this->node->{$this->rightAttribute}; |
|
174 | if ($position == 0) { |
|
175 | $rightTo = $this->parent->{$this->leftAttribute}; |
|
176 | } else { |
|
177 | $rightTo = $newPrevSiblingData[$newPrevSiblingId][$this->rightAttribute]; |
|
178 | } |
|
179 | $nodeOperator = '+'; |
|
180 | $parentOperator = $siblingsOperator = '-'; |
|
181 | $nodeDelta = $rightTo - $siblingsDelta + 1 - $this->node->{$this->leftAttribute}; |