Update Dashboard Layout

This commit is contained in:
Firman Herdiansyah
2025-02-05 13:36:33 +07:00
parent f38d518f96
commit 99e99fa2e6
96 changed files with 2817 additions and 414 deletions

View File

@@ -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();
});