|
|
|
@ -43,13 +43,14 @@
|
|
|
|
|
function transformScale() { |
|
|
|
|
var bounds = getScaleBounds(); |
|
|
|
|
scale = bounds.scale; |
|
|
|
|
wrapper.style.position = "relative"; |
|
|
|
|
wrapper.style.width = bounds.width + "px"; |
|
|
|
|
wrapper.style.height = bounds.height + "px"; |
|
|
|
|
wrapper.style.transform = "scale(" + bounds.scale+ ")"; |
|
|
|
|
wrapper.style.transformOrigin = "top left"; |
|
|
|
|
wrapper.style["-ms-transform"] = "scale(" + bounds.scale+ ")"; |
|
|
|
|
wrapper.style["-ms-transform-origin"] = "top left"; |
|
|
|
|
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"; |
|
|
|
|
|
|
|
|
@ -60,29 +61,29 @@
|
|
|
|
|
transformY = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
document.body.style.top = transformY + "px"; |
|
|
|
|
document.body.style.height = (bounds.height * scale) + "px"; |
|
|
|
|
document.body.style.overflow = "hidden"; |
|
|
|
|
// document.body.style.height = (bounds.height * scale) + "px";
|
|
|
|
|
// document.body.style.overflow = "hidden";
|
|
|
|
|
window.scale = window.devicePixelRatio * scale; |
|
|
|
|
// scaleFixed();
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 取消缩放
|
|
|
|
|
function removeScale() { |
|
|
|
|
wrapper.style.width = "100%"; |
|
|
|
|
wrapper.style.height = "100%"; |
|
|
|
|
wrapper.style.transform = ""; |
|
|
|
|
wrapper.style.transformOrigin = ""; |
|
|
|
|
wrapper.style["-ms-transform"] = ""; |
|
|
|
|
wrapper.style["-ms-transform-origin"] = ""; |
|
|
|
|
wrapper.style.overflowY = "hidden"; |
|
|
|
|
document.body.style.width = "100%"; |
|
|
|
|
document.body.style.height = "100%"; |
|
|
|
|
document.body.style.transform = ""; |
|
|
|
|
document.body.style.transformOrigin = ""; |
|
|
|
|
document.body.style["-ms-transform"] = ""; |
|
|
|
|
document.body.style["-ms-transform-origin"] = ""; |
|
|
|
|
document.body.style.overflowY = "hidden"; |
|
|
|
|
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 = ""; |
|
|
|
|
// document.body.style.top = "0px";
|
|
|
|
|
// document.body.style.width = "";
|
|
|
|
|
// document.body.style.height = "";
|
|
|
|
|
// document.body.style.overflowY = "";
|
|
|
|
|
window.scale = window.devicePixelRatio / scale; |
|
|
|
|
|
|
|
|
|
// revertFixed();
|
|
|
|
@ -218,20 +219,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; |
|
|
|
|
} |
|
|
|
|
// 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 {
|
|
|
|
@ -256,12 +257,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; |
|
|
|
|