Skip to content

Commit 08b3381

Browse files
committed
fix(timeline): better redraw on resize
1 parent d3763c7 commit 08b3381

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,12 +1227,14 @@ export default defineComponent({
12271227
app.view.style.opacity = '0'
12281228
// @ts-expect-error PIXI type is missing queueResize
12291229
app.queueResize()
1230-
mainRenderTexture?.resize(app.view.width, app.view.height)
1231-
queueEventsUpdate()
1232-
drawLayerBackgroundEffects()
1233-
drawTimeCursor()
1234-
drawTimeGrid()
1235-
draw()
1230+
requestAnimationFrame(() => {
1231+
mainRenderTexture?.resize(app.view.width, app.view.height)
1232+
queueEventsUpdate()
1233+
drawLayerBackgroundEffects()
1234+
drawTimeCursor()
1235+
drawTimeGrid()
1236+
draw()
1237+
})
12361238
}
12371239
12381240
// Events

0 commit comments

Comments
 (0)