summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph/model.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-27 08:17:33 +0300
committerPaul Buetow <paul@buetow.org>2026-05-27 08:17:33 +0300
commit891e31f845d5a1d9fc7426eb8351a05c42fb1cd5 (patch)
treeaf55bed456075ef23a6233f2120b9f824bb9faf3 /internal/tui/flamegraph/model.go
parent45b8e82f18cadbedb1c57156b9580b199033be3c (diff)
flamegraph: dedupe layout math for hit mapping (8p)
Diffstat (limited to 'internal/tui/flamegraph/model.go')
-rw-r--r--internal/tui/flamegraph/model.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/tui/flamegraph/model.go b/internal/tui/flamegraph/model.go
index b9a8734..9f14a70 100644
--- a/internal/tui/flamegraph/model.go
+++ b/internal/tui/flamegraph/model.go
@@ -1098,15 +1098,16 @@ func (m Model) rootSnapshotPath() string {
return m.ZoomNavigator.rootSnapshotPath(m.snapshot, m.frames)
}
-// frameIndexAt delegates to the FrameAnimator package-level helper to convert
+// frameIndexAt delegates to the renderer package-level helper to convert
// terminal coordinates (x, y) to a frame index, accounting for UI chrome.
func (m Model) frameIndexAt(x, y int) int {
return frameIndexAt(m.frames, x, y, m.width, m.height, m.showHelp, strings.TrimSpace(m.heightField) != "")
}
-// frameCoordToTargetRow delegates to the FrameAnimator package-level helper.
+// frameCoordToTargetRow delegates to the renderer package-level helper.
func (m Model) frameCoordToTargetRow(dataRow, availableRows int) int {
- return frameCoordToTargetRow(m.frames, dataRow, availableRows, strings.TrimSpace(m.heightField) != "")
+ params := computeRenderParamsForAvailableRows(m.frames, availableRows, strings.TrimSpace(m.heightField) != "")
+ return frameCoordToTargetRow(dataRow, params)
}
func (m Model) withZoomLineage(frames []tuiFrame) []tuiFrame {