pict-docuserve 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pict-docuserve.js
CHANGED
|
@@ -6326,6 +6326,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6326
6326
|
translateX: 0,
|
|
6327
6327
|
translateY: 0,
|
|
6328
6328
|
isPanning: false,
|
|
6329
|
+
didPan: false,
|
|
6329
6330
|
panStartX: 0,
|
|
6330
6331
|
panStartY: 0,
|
|
6331
6332
|
panOrigX: 0,
|
|
@@ -6391,8 +6392,14 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6391
6392
|
};
|
|
6392
6393
|
|
|
6393
6394
|
// Backdrop click closes (only when clicking the backdrop itself or
|
|
6394
|
-
// the stage area, not the inner content).
|
|
6395
|
+
// the stage area, not the inner content). Suppress if a
|
|
6396
|
+
// drag-to-pan just finished — the pointerup that ended the pan
|
|
6397
|
+
// also fires a click event which we must ignore.
|
|
6395
6398
|
tmpOverlay.addEventListener('click', pEvent => {
|
|
6399
|
+
if (tmpState.didPan) {
|
|
6400
|
+
tmpState.didPan = false;
|
|
6401
|
+
return;
|
|
6402
|
+
}
|
|
6396
6403
|
if (pEvent.target === tmpOverlay || pEvent.target === tmpStage) {
|
|
6397
6404
|
fClose();
|
|
6398
6405
|
}
|
|
@@ -6454,6 +6461,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6454
6461
|
return;
|
|
6455
6462
|
}
|
|
6456
6463
|
tmpState.isPanning = false;
|
|
6464
|
+
// Flag that a pan just ended so the subsequent click event
|
|
6465
|
+
// (which the browser fires after pointerup) does not close
|
|
6466
|
+
// the overlay via the backdrop-close handler.
|
|
6467
|
+
tmpState.didPan = true;
|
|
6457
6468
|
tmpStage.classList.remove('is-panning');
|
|
6458
6469
|
try {
|
|
6459
6470
|
tmpStage.releasePointerCapture(pEvent.pointerId);
|