Merge pull request #15875 from Snuffleupagus/viewer-name-consistency
Improve name consistency in the viewer (PR 15812 follow-up)
This commit is contained in:
commit
c791e01bfc
@ -656,7 +656,7 @@ const PDFViewerApplication = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.pdfViewer.increaseScale(steps, {
|
this.pdfViewer.increaseScale(steps, {
|
||||||
delay: AppOptions.get("defaultZoomDelay"),
|
drawingDelay: AppOptions.get("defaultZoomDelay"),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ const PDFViewerApplication = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.pdfViewer.decreaseScale(steps, {
|
this.pdfViewer.decreaseScale(steps, {
|
||||||
delay: AppOptions.get("defaultZoomDelay"),
|
drawingDelay: AppOptions.get("defaultZoomDelay"),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -599,7 +599,6 @@ class PDFPageView {
|
|||||||
isScalingRestricted = true;
|
isScalingRestricted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const postponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
|
const postponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
|
||||||
|
|
||||||
if (this.canvas) {
|
if (this.canvas) {
|
||||||
|
@ -1083,7 +1083,7 @@ class PDFViewer {
|
|||||||
_setScaleUpdatePages(
|
_setScaleUpdatePages(
|
||||||
newScale,
|
newScale,
|
||||||
newValue,
|
newValue,
|
||||||
{ noScroll = false, preset = false, delay: drawingDelay = -1 }
|
{ noScroll = false, preset = false, drawingDelay = -1 }
|
||||||
) {
|
) {
|
||||||
this._currentScaleValue = newValue.toString();
|
this._currentScaleValue = newValue.toString();
|
||||||
|
|
||||||
@ -1103,16 +1103,13 @@ class PDFViewer {
|
|||||||
newScale * PixelsPerInch.PDF_TO_CSS_UNITS
|
newScale * PixelsPerInch.PDF_TO_CSS_UNITS
|
||||||
);
|
);
|
||||||
|
|
||||||
const mustPostponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
|
const postponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
|
||||||
const updateArgs = {
|
this.refresh(true, {
|
||||||
scale: newScale,
|
scale: newScale,
|
||||||
};
|
drawingDelay: postponeDrawing ? drawingDelay : -1,
|
||||||
if (mustPostponeDrawing) {
|
});
|
||||||
updateArgs.drawingDelay = drawingDelay;
|
|
||||||
}
|
|
||||||
this.refresh(true, updateArgs);
|
|
||||||
|
|
||||||
if (mustPostponeDrawing) {
|
if (postponeDrawing) {
|
||||||
this.#scaleTimeoutId = setTimeout(() => {
|
this.#scaleTimeoutId = setTimeout(() => {
|
||||||
this.#scaleTimeoutId = null;
|
this.#scaleTimeoutId = null;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user