Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm committed Jun 13, 2013
1 parent adeaec1 commit 6b136a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions book.js
Expand Up @@ -1180,7 +1180,7 @@
};

pagination.resetSimpleFootnotes = function () {
var footnotes = eval(pagination.config('flowElement')).flowElement.querySelectorAll(pagination.config('footnoteSelector')+' > *'), i;
var footnotes = eval(pagination.config('flowElement')).querySelectorAll(pagination.config('footnoteSelector')+' > *'), i;
for (i=0;i<footnotes.length;i++) {
footnotes[i].style.top='';
}
Expand Down Expand Up @@ -1991,7 +1991,7 @@
/* Setup automatic addition and removing of pages when content is added or
* removed.
*/
var flowObject = this, checkOverset, checkAllEscapeReferencePagesPlacements, observer, observerOptions, reFlow;
var flowObject = this, checkOverset, checkAllEscapeReferencePagesPlacements, observer, observerOptions, reFlow, ourRawdiv;

checkOverset = function () {
/* Something has changed in the contents of this flow. Check if the
Expand Down Expand Up @@ -2032,14 +2032,16 @@
childList: true
};

ourRawdiv = this.rawdiv;

observer = new MutationObserver(function (mutations) {
observer.disconnect();
checkOverset();
checkAllEscapeReferencePagesPlacements();
observer.observe(this.rawdiv,observerOptions);
observer.observe(ourRawdiv,observerOptions);
});

observer.observe(this.rawdiv,observerOptions);
observer.observe(ourRawdiv,observerOptions);
}

reFlow = function () {
Expand Down

0 comments on commit 6b136a5

Please sign in to comment.