MCPcopy Create free account
hub / github.com/JKPotato-Computer/SignMaker / shiftRight

Method shiftRight

js/Post.js:92–99  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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
102Post.prototype.polePositions = [

Callers 2

shiftRightFunction · 0.80
shiftRightFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected