From 83631205e7378dfea1cd3bed135b87e1ac45012b Mon Sep 17 00:00:00 2001 From: Fay Date: Mon, 5 Aug 2019 12:13:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96inBounds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/finebi/plugin/web/plugin.screen_adaptive.js | 4 ++-- src/main/resources/com/finebi/plugin/web/scripts/entry.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js b/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js index 31dcff5..72abb68 100644 --- a/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js +++ b/src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js @@ -131,8 +131,8 @@ var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset(); var width = offset2Body.width || this.outerWidth(); var height = offset2Body.height || this.outerHeight(); - var pageX = e.pageX * scale, - pageY = e.pageY * scale + transformY; + var pageX = e.clientX * scale, + pageY = e.clientY * scale + transformY; return !(pageX < Math.floor(offset2Body.left) || pageX > offset2Body.left + width || pageY < Math.floor(offset2Body.top) || pageY > offset2Body.top + height); }; diff --git a/src/main/resources/com/finebi/plugin/web/scripts/entry.js b/src/main/resources/com/finebi/plugin/web/scripts/entry.js index 31dcff5..72abb68 100644 --- a/src/main/resources/com/finebi/plugin/web/scripts/entry.js +++ b/src/main/resources/com/finebi/plugin/web/scripts/entry.js @@ -131,8 +131,8 @@ var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset(); var width = offset2Body.width || this.outerWidth(); var height = offset2Body.height || this.outerHeight(); - var pageX = e.pageX * scale, - pageY = e.pageY * scale + transformY; + var pageX = e.clientX * scale, + pageY = e.clientY * scale + transformY; return !(pageX < Math.floor(offset2Body.left) || pageX > offset2Body.left + width || pageY < Math.floor(offset2Body.top) || pageY > offset2Body.top + height); };