nodebb-plugin-pdf-secure2 1.4.8 → 1.4.9
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/package.json +1 -1
- package/static/viewer-app.js +3 -3
- package/static/viewer.html +3 -6
package/package.json
CHANGED
package/static/viewer-app.js
CHANGED
|
@@ -2798,12 +2798,12 @@
|
|
|
2798
2798
|
const raw = e.deltaY;
|
|
2799
2799
|
const isMouseWheel = Math.abs(raw) >= 50;
|
|
2800
2800
|
if (isMouseWheel) {
|
|
2801
|
-
zoomAccumulator += (raw < 0 ? 0.
|
|
2801
|
+
zoomAccumulator += (raw < 0 ? 0.12 : -0.12);
|
|
2802
2802
|
} else {
|
|
2803
2803
|
const clamped = Math.max(-5, Math.min(5, raw));
|
|
2804
|
-
zoomAccumulator -= clamped * 0.
|
|
2804
|
+
zoomAccumulator -= clamped * 0.004;
|
|
2805
2805
|
}
|
|
2806
|
-
zoomAccumulator = Math.max(-0.
|
|
2806
|
+
zoomAccumulator = Math.max(-0.07, Math.min(0.07, zoomAccumulator));
|
|
2807
2807
|
|
|
2808
2808
|
if (!zoomRafId) {
|
|
2809
2809
|
zoomRafId = requestAnimationFrame(() => {
|
package/static/viewer.html
CHANGED
|
@@ -7593,15 +7593,12 @@
|
|
|
7593
7593
|
// Detect input type: mouse wheel sends |deltaY| >= 50, touchpad sends < 50
|
|
7594
7594
|
const isMouseWheel = Math.abs(raw) >= 50;
|
|
7595
7595
|
if (isMouseWheel) {
|
|
7596
|
-
|
|
7597
|
-
zoomAccumulator += (raw < 0 ? 0.08 : -0.08);
|
|
7596
|
+
zoomAccumulator += (raw < 0 ? 0.12 : -0.12);
|
|
7598
7597
|
} else {
|
|
7599
|
-
// Touchpad: very low sensitivity, clamp individual delta
|
|
7600
7598
|
const clamped = Math.max(-5, Math.min(5, raw));
|
|
7601
|
-
zoomAccumulator -= clamped * 0.
|
|
7599
|
+
zoomAccumulator -= clamped * 0.004;
|
|
7602
7600
|
}
|
|
7603
|
-
|
|
7604
|
-
zoomAccumulator = Math.max(-0.04, Math.min(0.04, zoomAccumulator));
|
|
7601
|
+
zoomAccumulator = Math.max(-0.07, Math.min(0.07, zoomAccumulator));
|
|
7605
7602
|
|
|
7606
7603
|
if (!zoomRafId) {
|
|
7607
7604
|
zoomRafId = requestAnimationFrame(() => {
|