summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph/animation.go
diff options
context:
space:
mode:
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 &&