Little bit of a hacky method, but queuePanel now waits until queue scale is properly rendered before rendering queue items
This commit is contained in:
parent
4dff3e562b
commit
d9bab09d53
|
|
@ -515,8 +515,12 @@ class queuePanel extends panelObj{
|
||||||
//Render out time scale
|
//Render out time scale
|
||||||
this.renderQueueScale(date);
|
this.renderQueueScale(date);
|
||||||
|
|
||||||
//wait a few frames so the scale can finish rendering, because dom function aren't async for some fucking reason
|
//Grab the first marker
|
||||||
for(let i = 0; i <= 2; i++){
|
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();
|
await utils.ux.awaitNextFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue