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 d272452..2372d8d 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 @@ -43,14 +43,12 @@ function transformScale() { var bounds = getScaleBounds(); scale = bounds.scale; - document.body.style.position = "relative"; document.body.style.width = bounds.width + "px"; document.body.style.height = bounds.height + "px"; document.body.style.transform = "scale(" + bounds.scale+ ")"; document.body.style.transformOrigin = "top left"; document.body.style["-ms-transform"] = "scale(" + bounds.scale+ ")"; document.body.style["-ms-transform-origin"] = "top left"; - document.body.style.top = transformY + "px"; html.style.overflowY = "auto"; html.style.backgroundColor = document.getElementsByClassName('bi-theme-dark').length === 0 ? "#2c3d59" : "#ffffff"; @@ -63,6 +61,7 @@ // document.body.style.height = (bounds.height * scale) + "px"; // document.body.style.overflow = "hidden"; + document.body.style.top = transformY + "px"; window.scale = window.devicePixelRatio * scale; // scaleFixed(); } @@ -261,8 +260,8 @@ if (BI.isIE()) { BI.Combo.prototype.adjustHeight = adjustHeight; BI.Tooltips.show = injectToolTipShow; - jQuery.fn.outerWidth = injectOuterWidth; - jQuery.fn.outerHeight = injectOuterHeight; + // jQuery.fn.outerWidth = injectOuterWidth; + // jQuery.fn.outerHeight = injectOuterHeight; } document.body.onmousedown = null; @@ -278,7 +277,7 @@ }, 30); function updateScale () { - if (html.getBoundingClientRect().width !== wrapper.getBoundingClientRect().width) { + if (html.getBoundingClientRect().width !== document.body.getBoundingClientRect().width) { selectHandler(); } } 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 d272452..2372d8d 100644 --- a/src/main/resources/com/finebi/plugin/web/scripts/entry.js +++ b/src/main/resources/com/finebi/plugin/web/scripts/entry.js @@ -43,14 +43,12 @@ function transformScale() { var bounds = getScaleBounds(); scale = bounds.scale; - document.body.style.position = "relative"; document.body.style.width = bounds.width + "px"; document.body.style.height = bounds.height + "px"; document.body.style.transform = "scale(" + bounds.scale+ ")"; document.body.style.transformOrigin = "top left"; document.body.style["-ms-transform"] = "scale(" + bounds.scale+ ")"; document.body.style["-ms-transform-origin"] = "top left"; - document.body.style.top = transformY + "px"; html.style.overflowY = "auto"; html.style.backgroundColor = document.getElementsByClassName('bi-theme-dark').length === 0 ? "#2c3d59" : "#ffffff"; @@ -63,6 +61,7 @@ // document.body.style.height = (bounds.height * scale) + "px"; // document.body.style.overflow = "hidden"; + document.body.style.top = transformY + "px"; window.scale = window.devicePixelRatio * scale; // scaleFixed(); } @@ -261,8 +260,8 @@ if (BI.isIE()) { BI.Combo.prototype.adjustHeight = adjustHeight; BI.Tooltips.show = injectToolTipShow; - jQuery.fn.outerWidth = injectOuterWidth; - jQuery.fn.outerHeight = injectOuterHeight; + // jQuery.fn.outerWidth = injectOuterWidth; + // jQuery.fn.outerHeight = injectOuterHeight; } document.body.onmousedown = null; @@ -278,7 +277,7 @@ }, 30); function updateScale () { - if (html.getBoundingClientRect().width !== wrapper.getBoundingClientRect().width) { + if (html.getBoundingClientRect().width !== document.body.getBoundingClientRect().width) { selectHandler(); } }