Skip to content

Commit 4e2b680

Browse files
committed
fix(timeline): resize
1 parent 51843fb commit 4e2b680

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

packages/app-frontend/src/features/timeline/TimelineView.vue

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const propConfig = {
5555
// Micro tasks (higher = later)
5656
const taskPriority = {
5757
normal: 0,
58-
resize: 1,
5958
addEventUpdate: 2,
6059
updateEvents: 3,
6160
runPositionUpdate: 4,
@@ -152,8 +151,9 @@ export default defineComponent({
152151
wrapper.value.appendChild(app.view)
153152
154153
// Prevent flash of white in dark mode
154+
// Init & on resize
155155
app.view.style.opacity = '0'
156-
app.renderer.once('postrender', () => {
156+
app.renderer.on('postrender', () => {
157157
app.view.style.opacity = '1'
158158
})
159159
@@ -1313,17 +1313,16 @@ export default defineComponent({
13131313
// Resize
13141314
13151315
function onResize () {
1316+
// Prevent flashing (will be set back to 1 in postrender event listener)
13161317
app.view.style.opacity = '0'
13171318
// @ts-expect-error PIXI type is missing queueResize
13181319
app.queueResize()
1319-
nextTick(() => {
1320-
mainRenderTexture?.resize(app.view.width, app.view.height)
1321-
queueEventsUpdate()
1322-
drawLayerBackgroundEffects()
1323-
drawTimeCursor()
1324-
drawTimeGrid()
1325-
draw()
1326-
}, taskPriority.resize)
1320+
mainRenderTexture?.resize(app.view.width, app.view.height)
1321+
queueEventsUpdate()
1322+
drawLayerBackgroundEffects()
1323+
drawTimeCursor()
1324+
drawTimeGrid()
1325+
draw()
13271326
}
13281327
13291328
// Events

0 commit comments

Comments
 (0)