|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
var injectEventFix = jQuery.event.fix; |
|
|
|
|
var injectMouseInBounds = jQuery.fn.__isMouseInBounds__; |
|
|
|
|
var injectToolTipShow = null; |
|
|
|
|
var injectBubblesShow = null; |
|
|
|
|
var adjustHeight = BI.Combo.prototype.adjustHeight; |
|
|
|
|
var injectOuterWidth = jQuery.fn.outerWidth; |
|
|
|
|
var injectOuterHeight = jQuery.fn.outerHeight; |
|
|
|
@ -125,6 +126,7 @@
|
|
|
|
|
function prepareEnv() { |
|
|
|
|
// IE的fixed元素不受transform:scale影响
|
|
|
|
|
injectToolTipShow = injectToolTipShow || BI.Tooltips.show; |
|
|
|
|
injectBubblesShow = injectBubblesShow || BI.Bubbles.show; |
|
|
|
|
jQuery.fn.__isMouseInBounds__ = function (e) { |
|
|
|
|
var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset(); |
|
|
|
|
var width = offset2Body.width || this.outerWidth(); |
|
|
|
@ -179,11 +181,14 @@
|
|
|
|
|
} while( el ); |
|
|
|
|
|
|
|
|
|
var elm = elem; |
|
|
|
|
do{ |
|
|
|
|
offsetLeft -= elm.scrollLeft || 0; |
|
|
|
|
offsetTop -= elm.scrollTop || 0; |
|
|
|
|
elm = elm.parentNode; |
|
|
|
|
} while( elm ); |
|
|
|
|
// 不知道该怎么写代码了,就这样了
|
|
|
|
|
if (!checkInPopupView(elm)) { |
|
|
|
|
do{ |
|
|
|
|
offsetLeft -= elm.scrollLeft || 0; |
|
|
|
|
offsetTop -= elm.scrollTop || 0; |
|
|
|
|
elm = elm.parentNode; |
|
|
|
|
} while( elm ); |
|
|
|
|
} |
|
|
|
|
win = getWindow( doc ); |
|
|
|
|
return { |
|
|
|
|
top: offsetTop + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), |
|
|
|
@ -218,6 +223,14 @@
|
|
|
|
|
tooltip.element[0].style.transform = "scale(" + scale+ ")"; |
|
|
|
|
tooltip.element[0].style.transformOrigin = "top left"; |
|
|
|
|
} |
|
|
|
|
BI.Bubbles.show = function (name, text, context, opt) { |
|
|
|
|
injectBubblesShow.call(this, name, text, context, opt); |
|
|
|
|
var tooltip = this.get(name); |
|
|
|
|
tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale + "px"; |
|
|
|
|
tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY + "px"; |
|
|
|
|
tooltip.element[0].style.transform = "scale(" + scale+ ")"; |
|
|
|
|
tooltip.element[0].style.transformOrigin = "top left"; |
|
|
|
|
} |
|
|
|
|
// jQuery.fn.outerWidth = function () {
|
|
|
|
|
// var wdith = injectOuterWidth.apply(this, arguments);
|
|
|
|
|
// if (this[0] === document.body) {
|
|
|
|
@ -260,6 +273,7 @@
|
|
|
|
|
if (BI.isIE()) { |
|
|
|
|
BI.Combo.prototype.adjustHeight = adjustHeight; |
|
|
|
|
BI.Tooltips.show = injectToolTipShow; |
|
|
|
|
BI.Bubbles.show = injectBubblesShow; |
|
|
|
|
// jQuery.fn.outerWidth = injectOuterWidth;
|
|
|
|
|
// jQuery.fn.outerHeight = injectOuterHeight;
|
|
|
|
|
} |
|
|
|
|