Skip to content

Commit 989a43a

Browse files
fix: pageX,pageY replace to clientX, clientY (#1)
1 parent b7ab306 commit 989a43a

8 files changed

+14
-22
lines changed

lib/magnifier.common.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ImageMagnifier.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@
144144
this.zoomImgHeight = (this.imgRect.height / this.maskRect.height) * this.zoomHeight;
145145
},
146146
handleMove(e) {
147-
this.maskX = this.outXCheck(e.pageX - this.imgRect.left);
148-
this.maskY = this.outYCheck(e.pageY - this.imgRect.top);
147+
this.maskX = this.outXCheck(e.clientX - this.imgRect.left);
148+
this.maskY = this.outYCheck(e.clientY - this.imgRect.top);
149149
this.zoomLeft = this.imgRect.width + 10;
150150
151151
//计算大图偏移量

0 commit comments

Comments
 (0)