Browse Source

Fixing disappearing pages (when multiple are visible)

notmasteryet 14 years ago committed by Julian Viereck
parent
commit
15cbb5a86a
  1. 4
      web/viewer.js

4
web/viewer.js

@ -16,6 +16,9 @@ var kMaxScale = 4.0;
var Cache = function cacheCache(size) { var Cache = function cacheCache(size) {
var data = []; var data = [];
this.push = function cachePush(view) { this.push = function cachePush(view) {
var i = data.indexOf(view);
if (i >= 0)
data.splice(i);
data.push(view); data.push(view);
if (data.length > size) if (data.length > size)
data.shift().update(); data.shift().update();
@ -277,7 +280,6 @@ var PDFView = {
view: singlePage }); view: singlePage });
currentHeight += singlePage.height * singlePage.scale + kBottomMargin; currentHeight += singlePage.height * singlePage.scale + kBottomMargin;
} }
return visiblePages; return visiblePages;
} }
}; };

Loading…
Cancel
Save