Skip to content

Commit 989a43a

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

File tree

8 files changed

+14
-22
lines changed

8 files changed

+14
-22
lines changed

lib/magnifier.common.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/magnifier.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ImageMagnifier.vue

Lines changed: 2 additions & 2 deletions
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)