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 +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/preview.ts +2 -1
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(
|
|
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(
|
|
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
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
|
-
|
|
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() {
|