Dispatch the pagerendered
event when zooming is only done with CSS (issue 6463)
In my opinion, this event shouldn't be dispatched in `PDFPageView.cssTransform`, since that would cause *two* events to be fired when "normal" zooming is used (once in `PDFPageView.cssTransform`, and once in `PDFPageView.draw`). Fixes 6463.
This commit is contained in:
parent
3a23367f04
commit
2646f27434
@ -181,6 +181,14 @@ var PDFPageView = (function PDFPageViewClosure() {
|
||||
if (PDFJS.useOnlyCssZoom ||
|
||||
(this.hasRestrictedScaling && isScalingRestricted)) {
|
||||
this.cssTransform(this.canvas, true);
|
||||
|
||||
var event = document.createEvent('CustomEvent');
|
||||
event.initCustomEvent('pagerendered', true, true, {
|
||||
pageNumber: this.id,
|
||||
cssTransform: true,
|
||||
});
|
||||
this.div.dispatchEvent(event);
|
||||
|
||||
return;
|
||||
}
|
||||
if (!this.zoomLayer) {
|
||||
@ -421,7 +429,8 @@ var PDFPageView = (function PDFPageViewClosure() {
|
||||
}
|
||||
var event = document.createEvent('CustomEvent');
|
||||
event.initCustomEvent('pagerendered', true, true, {
|
||||
pageNumber: self.id
|
||||
pageNumber: self.id,
|
||||
cssTransform: false,
|
||||
});
|
||||
div.dispatchEvent(event);
|
||||
//#if GENERIC
|
||||
|
Loading…
Reference in New Issue
Block a user