|
|
@ -414,12 +414,17 @@ var PageView = function pageView(container, id, scale, |
|
|
|
this.draw = function pageviewDraw(callback) { |
|
|
|
this.draw = function pageviewDraw(callback) { |
|
|
|
var pdfPage = this.pdfPage; |
|
|
|
var pdfPage = this.pdfPage; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.pagePdfPromise) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
if (!pdfPage) { |
|
|
|
if (!pdfPage) { |
|
|
|
var promise = PDFView.getPage(this.id); |
|
|
|
var promise = PDFView.getPage(this.id); |
|
|
|
promise.then(function(pdfPage) { |
|
|
|
promise.then(function(pdfPage) { |
|
|
|
|
|
|
|
delete this.pagePdfPromise; |
|
|
|
this.setPdfPage(pdfPage); |
|
|
|
this.setPdfPage(pdfPage); |
|
|
|
this.draw(callback); |
|
|
|
this.draw(callback); |
|
|
|
}.bind(this)); |
|
|
|
}.bind(this)); |
|
|
|
|
|
|
|
this.pagePdfPromise = promise; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|