summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph/animation.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-05 22:49:20 +0200
committerPaul Buetow <paul@buetow.org>2026-03-05 22:49:20 +0200
commit476cfb1aa569b42e7bab6cbfd5e548c9e85ee07c (patch)
tree74c2a854955e24ff1dd638b4cfd8a0120b576cc4 /internal/tui/flamegraph/animation.go
parentfd75c310b7571a48db9135360d99a331638721bc (diff)
task 363: animate flamegraph data refresh transitions
Diffstat (limited to 'internal/tui/flamegraph/animation.go')
-rw-r--r--internal/tui/flamegraph/animation.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/tui/flamegraph/animation.go b/internal/tui/flamegraph/animation.go
index 900231d..de3635d 100644
--- a/internal/tui/flamegraph/animation.go
+++ b/internal/tui/flamegraph/animation.go
@@ -117,6 +117,11 @@ func (a AnimationState) CurrentFrames() []tuiFrame {
return frames
}
+// Settled reports whether all active springs are at rest.
+func (a AnimationState) Settled() bool {
+ return a.settled
+}
+
func isSpringSettled(s frameSpring) bool {
return math.Abs(s.currentW-s.targetW) < springEpsilon &&
math.Abs(s.currentCol-s.targetCol) < springEpsilon &&