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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-pdf-secure2",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "Secure PDF viewer plugin for NodeBB - prevents downloading, enables canvas-only rendering with Premium group support",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -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.08 : -0.08);
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.002;
2804
+ zoomAccumulator -= clamped * 0.004;
2805
2805
  }
2806
- zoomAccumulator = Math.max(-0.04, Math.min(0.04, zoomAccumulator));
2806
+ zoomAccumulator = Math.max(-0.07, Math.min(0.07, zoomAccumulator));
2807
2807
 
2808
2808
  if (!zoomRafId) {
2809
2809
  zoomRafId = requestAnimationFrame(() => {
@@ -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
- // Mouse wheel: fixed step per click (ignore magnitude)
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.002;
7599
+ zoomAccumulator -= clamped * 0.004;
7602
7600
  }
7603
- // Cap total accumulator per frame (max ~4% zoom per frame)
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(() => {