Update Dashboard Layout
This commit is contained in:
@@ -408,6 +408,7 @@ class BigData {
|
||||
console.error("error fetching chart dara : ", error);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ArrowConnectorCircles {
|
||||
@@ -436,3 +437,33 @@ document.addEventListener("DOMContentLoaded", async function (e) {
|
||||
await new BigData().init();
|
||||
// new ArrowConnectorCircles().init();
|
||||
});
|
||||
|
||||
function resizeDashboard(){
|
||||
//Target Width
|
||||
let targetElement = document.getElementById("dashboard-fixed-wrapper");
|
||||
let targetWidth = targetElement.offsetWidth;
|
||||
//console.log("TARGET ",targetWidth);
|
||||
|
||||
//Real Object Width
|
||||
let dashboardElement = document.getElementById("dashboard-fixed-container");
|
||||
let dashboardWidth = 1110; //dashboardElement.offsetWidth;
|
||||
//console.log("CURRENT ",dashboardWidth);
|
||||
|
||||
if(targetWidth> dashboardWidth){
|
||||
targetWidth = dashboardWidth;
|
||||
}
|
||||
|
||||
dashboardElement.style.transformOrigin = "left top";
|
||||
dashboardElement.style.transition = "transform 0.2s ease-in-out";
|
||||
dashboardElement.style.transform = "scale(" + (targetWidth/dashboardWidth).toFixed(2) + ")";
|
||||
//console.log("SCALE ", (targetWidth/dashboardWidth).toFixed(2));
|
||||
}
|
||||
|
||||
window.addEventListener("load", function () {
|
||||
resizeDashboard();
|
||||
});
|
||||
|
||||
window.addEventListener("resize", function () {
|
||||
resizeDashboard();
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user