MCPcopy Index your code
hub / github.com/docker/docker-agent / Position

Method Position

pkg/tui/dialog/tool_confirmation.go:393–398  ·  view source on GitHub ↗

Position calculates the position to center the dialog

()

Source from the content-addressed store, hash-verified

391
392// Position calculates the position to center the dialog
393func (d *toolConfirmationDialog) Position() (row, col int) {
394 dialogWidth, _ := d.dialogDimensions()
395 renderedDialog := d.View()
396 dialogHeight := lipgloss.Height(renderedDialog)
397 return CenterPosition(d.Width(), d.Height(), dialogWidth, dialogHeight)
398}

Callers 1

handleMouseClickMethod · 0.95

Calls 5

dialogDimensionsMethod · 0.95
ViewMethod · 0.95
CenterPositionFunction · 0.85
HeightMethod · 0.45
WidthMethod · 0.45

Tested by

no test coverage detected