Browse Source

BI-69384 fix: 去除scale元素

persist/10.0^2
fay 4 years ago
parent
commit
83a407309e
  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

@ -137,9 +137,23 @@
fixedWrapper.style.height = "100%";
scale = 1;
if (BI.isIE()) {
removeDomScale(document.body);
}
window.scale = window.devicePixelRatio;
}
function removeDomScale(dom) {
var style = dom.style;
if (style.transform.includes("scale") && (style.transformOrigin === "top left" || style.transformOrigin === "left top")) {
style.transform = "";
style.transformOrigin = "";
}
BI.each(dom.children, function (idx, child) {
removeDomScale(child);
})
}
// 获取缩放倍数,原模板宽高
function getScaleBounds(ratio) {
var widgets = BI.designConfigure.widgets,

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

@ -137,9 +137,23 @@
fixedWrapper.style.height = "100%";
scale = 1;
if (BI.isIE()) {
removeDomScale(document.body);
}
window.scale = window.devicePixelRatio;
}
function removeDomScale(dom) {
var style = dom.style;
if (style.transform.includes("scale") && (style.transformOrigin === "top left" || style.transformOrigin === "left top")) {
style.transform = "";
style.transformOrigin = "";
}
BI.each(dom.children, function (idx, child) {
removeDomScale(child);
})
}
// 获取缩放倍数,原模板宽高
function getScaleBounds(ratio) {
var widgets = BI.designConfigure.widgets,

Loading…
Cancel
Save