Browse Source

fix: 优化inBounds

feature/10.0
Fay 5 years ago
parent
commit
83631205e7
  1. 4
      src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js
  2. 4
      src/main/resources/com/finebi/plugin/web/scripts/entry.js

4
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);
};

4
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);
};

Loading…
Cancel
Save