- var spreadIndices = [null, null];
- if ('rl' == this.pageProgression) {
- // Right to Left
- if (this.getPageSide(pindex) == 'R') {
- spreadIndices[1] = pindex;
- spreadIndices[0] = pindex + 1;
- } else {
- // Given index was LHS
- spreadIndices[0] = pindex;
- spreadIndices[1] = pindex - 1;
- }
- } else {
- // Left to right
- if (this.getPageSide(pindex) == 'L') {
- spreadIndices[0] = pindex;
- spreadIndices[1] = pindex + 1;
- } else {
- // Given index was RHS
- spreadIndices[1] = pindex;
- spreadIndices[0] = pindex - 1;
- }
- }
-
- return spreadIndices;
+ var spreadIndices = [null, null];
+ if ('rl' == this.pageProgression) {
+ // Right to Left
+ if (this.getPageSide(pindex) == 'R') {
+ spreadIndices[1] = pindex;
+ spreadIndices[0] = pindex + 1;
+ } else {
+ // Given index was LHS
+ spreadIndices[0] = pindex;
+ spreadIndices[1] = pindex - 1;
+ }
+ } else {
+ // Left to right
+ if (this.getPageSide(pindex) == 'L') {
+ spreadIndices[0] = pindex;
+ spreadIndices[1] = pindex + 1;
+ } else {
+ // Given index was RHS
+ spreadIndices[1] = pindex;
+ spreadIndices[0] = pindex - 1;
+ }
+ }
+
+ return spreadIndices;