Browse Source

Merge pull request #27 in PG2/plugin-bi-screen-adaptive from ~FAY/plugin-bi-screen-adaptive:release/10.0 to release/10.0

* commit 'db98df02f1e9ba5b5a2ea2c577c7ae8fab103837':
  fix IE
  BI-61373 fix: 插件造成模板位置问题
release/10.0
fay 5 years ago
parent
commit
77b5fc2e5f
  1. 14
      src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js
  2. 14
      src/main/resources/com/finebi/plugin/web/scripts/entry.js

14
src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js

@ -203,7 +203,7 @@
} }
offsetLeft -= elm.scrollLeft || 0; offsetLeft -= elm.scrollLeft || 0;
offsetTop -= elm.scrollTop || 0; offsetTop -= elm.scrollTop || 0;
elm = elm.parentNode; elm = elm.offsetParent;
} while( elm ); } while( elm );
} }
win = getWindow( doc ); win = getWindow( doc );
@ -221,8 +221,8 @@
adjustHeight.call(this, e); adjustHeight.call(this, e);
if (this.popupView) { if (this.popupView) {
if (!checkInPopupView(this.popupView.element[0])) { if (!checkInPopupView(this.popupView.element[0])) {
this.popupView.element[0].style.left = parseInt(this.popupView.element[0].style.left) * scale + "px"; this.popupView.element[0].style.left = (parseInt(this.popupView.element[0].style.left) * scale - document.body.scrollLeft) + "px";
this.popupView.element[0].style.top = parseInt(this.popupView.element[0].style.top) * scale + transformY + "px"; this.popupView.element[0].style.top = (parseInt(this.popupView.element[0].style.top) * scale + transformY - document.body.scrollTop) + "px";
} else { } else {
} }
@ -233,16 +233,16 @@
BI.Tooltips.show = function (e, name, text, level, context, opt) { BI.Tooltips.show = function (e, name, text, level, context, opt) {
injectToolTipShow.call(this, e, name, text, level, context, opt); injectToolTipShow.call(this, e, name, text, level, context, opt);
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale + "px"; tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale - document.body.scrollLeft + "px";
tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY + "px"; tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY - document.body.scrollTop + "px";
tooltip.element[0].style.transform = "scale(" + scale+ ")"; tooltip.element[0].style.transform = "scale(" + scale+ ")";
tooltip.element[0].style.transformOrigin = "top left"; tooltip.element[0].style.transformOrigin = "top left";
} }
BI.Bubbles.show = function (name, text, context, opt) { BI.Bubbles.show = function (name, text, context, opt) {
injectBubblesShow.call(this, name, text, context, opt); injectBubblesShow.call(this, name, text, context, opt);
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale + "px"; tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale - document.body.scrollLeft + "px";
tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY + "px"; tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY - document.body.scrollTop + "px";
tooltip.element[0].style.transform = "scale(" + scale+ ")"; tooltip.element[0].style.transform = "scale(" + scale+ ")";
tooltip.element[0].style.transformOrigin = "top left"; tooltip.element[0].style.transformOrigin = "top left";
} }

14
src/main/resources/com/finebi/plugin/web/scripts/entry.js

@ -203,7 +203,7 @@
} }
offsetLeft -= elm.scrollLeft || 0; offsetLeft -= elm.scrollLeft || 0;
offsetTop -= elm.scrollTop || 0; offsetTop -= elm.scrollTop || 0;
elm = elm.parentNode; elm = elm.offsetParent;
} while( elm ); } while( elm );
} }
win = getWindow( doc ); win = getWindow( doc );
@ -221,8 +221,8 @@
adjustHeight.call(this, e); adjustHeight.call(this, e);
if (this.popupView) { if (this.popupView) {
if (!checkInPopupView(this.popupView.element[0])) { if (!checkInPopupView(this.popupView.element[0])) {
this.popupView.element[0].style.left = parseInt(this.popupView.element[0].style.left) * scale + "px"; this.popupView.element[0].style.left = (parseInt(this.popupView.element[0].style.left) * scale - document.body.scrollLeft) + "px";
this.popupView.element[0].style.top = parseInt(this.popupView.element[0].style.top) * scale + transformY + "px"; this.popupView.element[0].style.top = (parseInt(this.popupView.element[0].style.top) * scale + transformY - document.body.scrollTop) + "px";
} else { } else {
} }
@ -233,16 +233,16 @@
BI.Tooltips.show = function (e, name, text, level, context, opt) { BI.Tooltips.show = function (e, name, text, level, context, opt) {
injectToolTipShow.call(this, e, name, text, level, context, opt); injectToolTipShow.call(this, e, name, text, level, context, opt);
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale + "px"; tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale - document.body.scrollLeft + "px";
tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY + "px"; tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY - document.body.scrollTop + "px";
tooltip.element[0].style.transform = "scale(" + scale+ ")"; tooltip.element[0].style.transform = "scale(" + scale+ ")";
tooltip.element[0].style.transformOrigin = "top left"; tooltip.element[0].style.transformOrigin = "top left";
} }
BI.Bubbles.show = function (name, text, context, opt) { BI.Bubbles.show = function (name, text, context, opt) {
injectBubblesShow.call(this, name, text, context, opt); injectBubblesShow.call(this, name, text, context, opt);
var tooltip = this.get(name); var tooltip = this.get(name);
tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale + "px"; tooltip.element[0].style.left = parseInt(tooltip.element[0].style.left) * scale - document.body.scrollLeft + "px";
tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY + "px"; tooltip.element[0].style.top = parseInt(tooltip.element[0].style.top) * scale + transformY - document.body.scrollTop + "px";
tooltip.element[0].style.transform = "scale(" + scale+ ")"; tooltip.element[0].style.transform = "scale(" + scale+ ")";
tooltip.element[0].style.transformOrigin = "top left"; tooltip.element[0].style.transformOrigin = "top left";
} }

Loading…
Cancel
Save