Skip to content

Commit

Permalink
Merge pull request #19226 from Snuffleupagus/pr-19216-followup
Browse files Browse the repository at this point in the history
Disable touch-zooming, in the viewer, if `AbortSignal.any` is unsupported (PR 19216 follow-up)
  • Loading branch information
timvandermeij authored Dec 15, 2024
2 parents b781b55 + 29c3b7b commit 8985d80
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8985d80

Please sign in to comment.