lite-image-preview 1.0.0 → 1.0.1

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/main.cjs CHANGED
@@ -676,7 +676,7 @@ function createSvgViewBoxAdapter(svg) {
676
676
  }
677
677
  function zoomWithWheel(e) {
678
678
  e.preventDefault();
679
- zoomAt(e.clientX, e.clientY, Math.exp(-e.deltaY * .0015));
679
+ zoomAt(e.clientX, e.clientY, Math.exp(e.deltaY * .0015));
680
680
  }
681
681
  function destroy() {
682
682
  pinchStart = null;
package/dist/main.js CHANGED
@@ -675,7 +675,7 @@ function createSvgViewBoxAdapter(svg) {
675
675
  }
676
676
  function zoomWithWheel(e) {
677
677
  e.preventDefault();
678
- zoomAt(e.clientX, e.clientY, Math.exp(-e.deltaY * .0015));
678
+ zoomAt(e.clientX, e.clientY, Math.exp(e.deltaY * .0015));
679
679
  }
680
680
  function destroy() {
681
681
  pinchStart = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lite-image-preview",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Lightweight image and SVG preview dialog with smooth pinch zoom, crisp SVG scaling, and mobile-friendly gesture handling.",
5
5
  "keywords": [
6
6
  "front-end",
package/src/preview.ts CHANGED
@@ -779,7 +779,8 @@ function createSvgViewBoxAdapter(svg: SVGSVGElement): PreviewAdapter {
779
779
  e.preventDefault()
780
780
 
781
781
  // Wheel up (deltaY < 0) zooms in; wheel down zooms out.
782
- zoomAt(e.clientX, e.clientY, Math.exp(-e.deltaY * 0.0015))
782
+ // The SVG logic has a specified problem that reverses the factor
783
+ zoomAt(e.clientX, e.clientY, Math.exp(e.deltaY * 0.0015))
783
784
  }
784
785
 
785
786
  function destroy() {