Browse Source

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

* commit 'd0c6a3d98adb0b6ab5c3260d53a8ec2721dbfd00':
  update
  update
  update
feature/10.0
fay 5 years ago
parent
commit
97901d90ef
  1. 31
      src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js
  2. 31
      src/main/resources/com/finebi/plugin/web/scripts/entry.js

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

@ -1,5 +1,6 @@
!(function () {
var scale = 1, transformY = 0, selected = false;
var wrapper = document.getElementById("wrapper");
var html = document.getElementsByTagName('html')[0];
var jQuery = $ || window.jQuery;
@ -57,9 +58,10 @@
} else {
transformY = 0;
}
document.body.style.top = transformY + "px";
// 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();
}
@ -73,10 +75,14 @@
document.body.style["-ms-transform"] = "";
document.body.style["-ms-transform-origin"] = "";
document.body.style.overflowY = "hidden";
document.body.style.top = "0px";
document.body.style.top = "";
html.style.backgroundColor = "#ffffff";
scale = 1;
// document.body.style.top = "0px";
// document.body.style.width = "";
// document.body.style.height = "";
// document.body.style.overflowY = "";
window.scale = window.devicePixelRatio / scale;
// revertFixed();
@ -212,7 +218,20 @@
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) {
// return wdith / scale;
// }
// return wdith;
// }
// jQuery.fn.outerHeight = function () {
// var height = injectOuterHeight.apply(this, arguments);
// if (this[0] === document.body) {
// return height / scale;
// }
// return height;
// }
// BI.DOM.getBottomPosition = function (combo, popup, extraHeight) {
// var el = combo.element;
// return {
@ -237,12 +256,12 @@
jQuery.fn.__isMouseInBounds__ = injectMouseInBounds;
jQuery.fn.offset = injectOffset;
jQuery.event.fix = injectEventFix;
// jQuery.fn.outerWidth = injectOuterWidth;
// jQuery.fn.outerHeight = injectOuterHeight;
// jQuery.fn.bounds = injectBounds;
if (BI.isIE()) {
BI.Combo.prototype.adjustHeight = adjustHeight;
BI.Tooltips.show = injectToolTipShow;
// jQuery.fn.outerWidth = injectOuterWidth;
// jQuery.fn.outerHeight = injectOuterHeight;
}
document.body.onmousedown = null;

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

@ -1,5 +1,6 @@
!(function () {
var scale = 1, transformY = 0, selected = false;
var wrapper = document.getElementById("wrapper");
var html = document.getElementsByTagName('html')[0];
var jQuery = $ || window.jQuery;
@ -57,9 +58,10 @@
} else {
transformY = 0;
}
document.body.style.top = transformY + "px";
// 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();
}
@ -73,10 +75,14 @@
document.body.style["-ms-transform"] = "";
document.body.style["-ms-transform-origin"] = "";
document.body.style.overflowY = "hidden";
document.body.style.top = "0px";
document.body.style.top = "";
html.style.backgroundColor = "#ffffff";
scale = 1;
// document.body.style.top = "0px";
// document.body.style.width = "";
// document.body.style.height = "";
// document.body.style.overflowY = "";
window.scale = window.devicePixelRatio / scale;
// revertFixed();
@ -212,7 +218,20 @@
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) {
// return wdith / scale;
// }
// return wdith;
// }
// jQuery.fn.outerHeight = function () {
// var height = injectOuterHeight.apply(this, arguments);
// if (this[0] === document.body) {
// return height / scale;
// }
// return height;
// }
// BI.DOM.getBottomPosition = function (combo, popup, extraHeight) {
// var el = combo.element;
// return {
@ -237,12 +256,12 @@
jQuery.fn.__isMouseInBounds__ = injectMouseInBounds;
jQuery.fn.offset = injectOffset;
jQuery.event.fix = injectEventFix;
// jQuery.fn.outerWidth = injectOuterWidth;
// jQuery.fn.outerHeight = injectOuterHeight;
// jQuery.fn.bounds = injectBounds;
if (BI.isIE()) {
BI.Combo.prototype.adjustHeight = adjustHeight;
BI.Tooltips.show = injectToolTipShow;
// jQuery.fn.outerWidth = injectOuterWidth;
// jQuery.fn.outerHeight = injectOuterHeight;
}
document.body.onmousedown = null;

Loading…
Cancel
Save