Browse Source

Merge pull request #559 in VISUAL/fineui from ~FAY/fineui:master to master

* commit '59fee28170b4cc721e39695c83cd55e076c11748':
  mouseInBounds方法修改
es6
fay 6 years ago
parent
commit
6e5382b397
  1. 8
      src/core/func/dom.js

8
src/core/func/dom.js

@ -119,9 +119,11 @@ BI.extend(jQuery.fn, {
},
__isMouseInBounds__: function (e) {
var offset2Body = this.offset();
return !(e.pageX < offset2Body.left || e.pageX > offset2Body.left + this.outerWidth()
|| e.pageY < offset2Body.top || e.pageY > offset2Body.top + this.outerHeight());
var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset();
var width = offset2Body.width || this.outerWidth();
var height = offset2Body.height || this.outerHeight();
return !(e.pageX < offset2Body.left || e.pageX > offset2Body.left + width
|| e.pageY < offset2Body.top || e.pageY > offset2Body.top + height);
},
__hasZIndexMask__: function (zindex) {

Loading…
Cancel
Save