From d9bab09d5360271f8ff9cd756b70d7024e0d55ab Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sun, 27 Apr 2025 08:55:11 -0400 Subject: [PATCH] Little bit of a hacky method, but queuePanel now waits until queue scale is properly rendered before rendering queue items --- www/js/channel/panels/queuePanel/queuePanel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/js/channel/panels/queuePanel/queuePanel.js b/www/js/channel/panels/queuePanel/queuePanel.js index 0adb6da..d368f57 100644 --- a/www/js/channel/panels/queuePanel/queuePanel.js +++ b/www/js/channel/panels/queuePanel/queuePanel.js @@ -515,8 +515,12 @@ class queuePanel extends panelObj{ //Render out time scale this.renderQueueScale(date); - //wait a few frames so the scale can finish rendering, because dom function aren't async for some fucking reason - for(let i = 0; i <= 2; i++){ + //Grab the first marker + let firstMarker = this.panelDocument.querySelector('.queue-marker-first'); + + //Loop until first marker is properly positioned + while(firstMarker.offsetTop > 0){ + //wait a few frames so the scale can finish rendering, because dom function aren't async for some fucking reason await utils.ux.awaitNextFrame(); }