1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

Merge pull request #19226 from Snuffleupagus/pr-19216-followup

Disable touch-zooming, in the viewer, if `AbortSignal.any` is unsupported (PR 19216 follow-up)
This commit is contained in:
Tim van der Meij 2024-12-15 19:15:32 +01:00 committed by GitHub
commit 8985d80aef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2045,14 +2045,19 @@ const PDFViewerApplication = {
_windowAbortController: { signal },
} = this;
this._touchManager = new TouchManager({
container: window,
isPinchingDisabled: () => this.pdfViewer.isInPresentationMode,
isPinchingStopped: () => this.overlayManager?.active,
onPinching: this.touchPinchCallback.bind(this),
onPinchEnd: this.touchPinchEndCallback.bind(this),
signal,
});
if (
(typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
typeof AbortSignal.any === "function"
) {
this._touchManager = new TouchManager({
container: window,
isPinchingDisabled: () => pdfViewer.isInPresentationMode,
isPinchingStopped: () => this.overlayManager?.active,
onPinching: this.touchPinchCallback.bind(this),
onPinchEnd: this.touchPinchEndCallback.bind(this),
signal,
});
}
function addWindowResolutionChange(evt = null) {
if (evt) {