|
|
@ -1,7 +1,14 @@ |
|
|
|
!(function () { |
|
|
|
!(function () { |
|
|
|
var scale = 1, transformY = 0, selected = true; |
|
|
|
var scale = 1, transformY = 0, selected = true; |
|
|
|
var wrapper = document.getElementById("wrapper"); |
|
|
|
|
|
|
|
var html = document.getElementsByTagName('html')[0]; |
|
|
|
var html = document.getElementsByTagName('html')[0]; |
|
|
|
|
|
|
|
var wrapper = document.getElementById("wrapper"); |
|
|
|
|
|
|
|
var fixedContainer = document.createElement('div'); |
|
|
|
|
|
|
|
fixedContainer.style.position = "absolute"; |
|
|
|
|
|
|
|
fixedContainer.style.top = "0"; |
|
|
|
|
|
|
|
fixedContainer.style.left = "0"; |
|
|
|
|
|
|
|
fixedContainer.style.width = "100%"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wrapper.appendChild(fixedContainer); |
|
|
|
|
|
|
|
|
|
|
|
var jQuery = $ || window.jQuery; |
|
|
|
var jQuery = $ || window.jQuery; |
|
|
|
var injectOffset = jQuery.fn.offset; |
|
|
|
var injectOffset = jQuery.fn.offset; |
|
|
@ -53,6 +60,7 @@ |
|
|
|
wrapper.style.transformOrigin = "top left"; |
|
|
|
wrapper.style.transformOrigin = "top left"; |
|
|
|
wrapper.style["-ms-transform"] = "scale(" + bounds.scale+ ")"; |
|
|
|
wrapper.style["-ms-transform"] = "scale(" + bounds.scale+ ")"; |
|
|
|
wrapper.style["-ms-transform-origin"] = "top left"; |
|
|
|
wrapper.style["-ms-transform-origin"] = "top left"; |
|
|
|
|
|
|
|
fixedContainer.style.height = (document.body.clientHeight / scale) + "px"; |
|
|
|
// html.style.backgroundColor = document.getElementsByClassName('bi-theme-dark').length === 0 ? "#2c3d59" : "#ffffff";
|
|
|
|
// html.style.backgroundColor = document.getElementsByClassName('bi-theme-dark').length === 0 ? "#2c3d59" : "#ffffff";
|
|
|
|
html.style.backgroundColor = "#ffffff"; |
|
|
|
html.style.backgroundColor = "#ffffff"; |
|
|
|
|
|
|
|
|
|
|
@ -80,6 +88,7 @@ |
|
|
|
wrapper.style["-ms-transform-origin"] = ""; |
|
|
|
wrapper.style["-ms-transform-origin"] = ""; |
|
|
|
wrapper.style.overflowY = "hidden"; |
|
|
|
wrapper.style.overflowY = "hidden"; |
|
|
|
wrapper.style.top = ""; |
|
|
|
wrapper.style.top = ""; |
|
|
|
|
|
|
|
fixedContainer.style.height = "0px"; |
|
|
|
html.style.backgroundColor = "#ffffff"; |
|
|
|
html.style.backgroundColor = "#ffffff"; |
|
|
|
|
|
|
|
|
|
|
|
scale = 1; |
|
|
|
scale = 1; |
|
|
@ -274,11 +283,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget = function () { |
|
|
|
BI.createWidget = function () { |
|
|
|
if (arguments[0] && arguments[0].element === "body") { |
|
|
|
if (arguments[0] && arguments[0].element === "body") { |
|
|
|
arguments[0].element = wrapper; |
|
|
|
arguments[0].element = fixedContainer; |
|
|
|
} |
|
|
|
} |
|
|
|
return injectCreate.apply(this, arguments); |
|
|
|
return injectCreate.apply(this, arguments); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Popovers
|
|
|
|
|
|
|
|
BI.Popovers = new BI.PopoverController({render: fixedContainer}); |
|
|
|
|
|
|
|
|
|
|
|
// document.body.onmousedown = scaleFixed;
|
|
|
|
// document.body.onmousedown = scaleFixed;
|
|
|
|
window.addEventListener('resize', updateScale); |
|
|
|
window.addEventListener('resize', updateScale); |
|
|
|
window.matchMedia && window.matchMedia('screen and (min-resolution: 2dppx)'). |
|
|
|
window.matchMedia && window.matchMedia('screen and (min-resolution: 2dppx)'). |
|
|
@ -299,6 +311,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
BI.createWidget = injectCreate; |
|
|
|
BI.createWidget = injectCreate; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Popovers
|
|
|
|
|
|
|
|
BI.Popovers = new BI.PopoverController(); |
|
|
|
|
|
|
|
|
|
|
|
document.body.onmousedown = null; |
|
|
|
document.body.onmousedown = null; |
|
|
|
window.removeEventListener('resize', updateScale); |
|
|
|
window.removeEventListener('resize', updateScale); |
|
|
|
window.matchMedia && window.matchMedia('screen and (min-resolution: 2dppx)'). |
|
|
|
window.matchMedia && window.matchMedia('screen and (min-resolution: 2dppx)'). |
|
|
|