Permalink
Browse files

Small bug fix

Encountered a small bug when the page contents consisted of multiple
divs. Weird cause it only affected the first page.
  • Loading branch information...
Matt Lantz
Matt Lantz committed Nov 26, 2012
1 parent 30bf771 commit 04ea37af4d5544bd8a988b83ca8193abb9c5c58f
Showing with 3 additions and 9 deletions.
  1. +1 −2 build/alice.js
  2. +1 −5 build/alice.min.js
  3. BIN build/alice.min.js.gz
  4. +1 −2 src/alice.plugins.caterpillar.js
View
@@ -2833,8 +2833,7 @@ alice.plugins.caterpillar = (function () {
if(params.pageId >= params.realPageCount && params.wrap === true){
params.pageId = 0;
}
- nxtPageId = document.getElementById(params.bookName).querySelector('div:nth-child('+(params.pageId + 1)+')').getAttribute('id');
- nxtPage = document.getElementById(nxtPageId);
+ nxtPage = document.getElementById(params.bookName+"p_"+(params.pageId+1));
nxtPage.style.display = 'block';
if(params.binding === 'center' || params.binding === 'middle'){
nxtPage.style[alice.prefixJS+'Transform'] = params.transformRotate+core._rot90;
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.
@@ -1108,8 +1108,7 @@ alice.plugins.caterpillar = (function () {
if(params.pageId >= params.realPageCount && params.wrap === true){
params.pageId = 0;
}
- nxtPageId = document.getElementById(params.bookName).querySelector('div:nth-child('+(params.pageId + 1)+')').getAttribute('id');
- nxtPage = document.getElementById(nxtPageId);
+ nxtPage = document.getElementById(params.bookName+"p_"+(params.pageId+1));
nxtPage.style.display = 'block';
if(params.binding === 'center' || params.binding === 'middle'){
nxtPage.style[alice.prefixJS+'Transform'] = params.transformRotate+core._rot90;

0 comments on commit 04ea37a

Please sign in to comment.