mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00
Update block-animation.js
This commit is contained in:
parent
401655c3ae
commit
7aee1fe982
@ -362,23 +362,23 @@ class BlockMiningAnimation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize and start the animation when the page loads
|
// Initialize and start the animation when the page loads
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
// document.addEventListener("DOMContentLoaded", function () {
|
||||||
console.log("DOM content loaded, initializing animation");
|
// console.log("DOM content loaded, initializing animation");
|
||||||
|
|
||||||
// Ensure we give the SVG enough time to be fully rendered and accessible
|
// Ensure we give the SVG enough time to be fully rendered and accessible
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
const svgContainer = document.getElementById("svg-container");
|
// const svgContainer = document.getElementById("svg-container");
|
||||||
if (!svgContainer) {
|
// if (!svgContainer) {
|
||||||
console.error("SVG container not found in DOM");
|
// console.error("SVG container not found in DOM");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
const animation = new BlockMiningAnimation("svg-container");
|
// const animation = new BlockMiningAnimation("svg-container");
|
||||||
animation.start();
|
// animation.start();
|
||||||
console.log("Animation started successfully");
|
// console.log("Animation started successfully");
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.error("Error starting animation:", error);
|
// console.error("Error starting animation:", error);
|
||||||
}
|
// }
|
||||||
}, 1500); // Increased delay to ensure SVG is fully loaded
|
// }, 1500); // Increased delay to ensure SVG is fully loaded
|
||||||
});
|
// });
|
||||||
|
Loading…
Reference in New Issue
Block a user