Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Small bug fix
Browse files Browse the repository at this point in the history
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 committed Nov 26, 2012
1 parent 30bf771 commit 04ea37a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions build/alice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions build/alice.min.js

Large diffs are not rendered by default.

Binary file modified build/alice.min.js.gz
Binary file not shown.
3 changes: 1 addition & 2 deletions src/alice.plugins.caterpillar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 04ea37a

Please sign in to comment.