This commit is contained in:
Artur Adib 2012-09-12 15:07:23 -07:00
parent 708eb78c67
commit 0e89fe7d9d

View File

@ -1867,9 +1867,9 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
this.endLayout = function textLayerBuilderEndLayout() { this.endLayout = function textLayerBuilderEndLayout() {
// Schedule renderLayout() if user has been scrolling, otherwise // Schedule renderLayout() if user has been scrolling, otherwise
// run it right away // run it right away
var renderDelay = 200; // in ms var kRenderDelay = 200; // in ms
var self = this; var self = this;
if (Date.now() - PDFView.lastScroll > renderDelay) { if (Date.now() - PDFView.lastScroll > kRenderDelay) {
// Render right away // Render right away
this.renderLayer(); this.renderLayer();
} else { } else {
@ -1878,7 +1878,7 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
clearTimeout(this.renderTimer); clearTimeout(this.renderTimer);
this.renderTimer = setTimeout(function() { this.renderTimer = setTimeout(function() {
self.endLayout(); self.endLayout();
}, renderDelay); }, kRenderDelay);
} }
}; // endLayout }; // endLayout