diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 22:51:51 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 22:51:51 +0200 |
| commit | 58267b80526c0faba0ff528fe768e92dd21e0b6f (patch) | |
| tree | 1dac5a6389483fcbf6b4ed8e212ca6b518d95504 /internal/tui/flamegraph/model.go | |
| parent | 4d69b8bf11b563d8ec6693447c09f35dec13b148 (diff) | |
task 365: animate flamegraph layout on resize
Diffstat (limited to 'internal/tui/flamegraph/model.go')
| -rw-r--r-- | internal/tui/flamegraph/model.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/tui/flamegraph/model.go b/internal/tui/flamegraph/model.go index 8433fea..ddf40fd 100644 --- a/internal/tui/flamegraph/model.go +++ b/internal/tui/flamegraph/model.go @@ -144,6 +144,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, animTickCmd() } return m, nil + case tea.WindowSizeMsg: + m.width = msg.Width + m.height = msg.Height + m.rebuildFrames(true) + if m.animating { + return m, animTickCmd() + } + return m, nil case tea.KeyPressMsg: if m.searchActive { switch msg.String() { |
