* Shift the requested panel to the right one position swaping it with that panel to the right. * @param {number} panelIndex - Position of the panel in the array of panels on this post to shift right. * @return {number} The new index of the shifted panel.
(panelIndex)
| 90 | * @return {number} The new index of the shifted panel. |
| 91 | */ |
| 92 | shiftRight(panelIndex) { |
| 93 | // If already at the far right end, return. |
| 94 | if (panelIndex >= this.panels.length - 1) { |
| 95 | return panelIndex; |
| 96 | } |
| 97 | this.panels.splice(panelIndex, 2, this.panels[panelIndex + 1], this.panels[panelIndex]); |
| 98 | return panelIndex + 1; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | Post.prototype.polePositions = [ |
no outgoing calls
no test coverage detected