MCPcopy Create free account
hub / github.com/docker/docker-agent / viewportSize

Method viewportSize

cmd/root/agent_picker.go:409–412  ·  view source on GitHub ↗

viewportSize returns the inner content dimensions of the YAML viewport.

()

Source from the content-addressed store, hash-verified

407
408// viewportSize returns the inner content dimensions of the YAML viewport.
409func (m *agentPickerModel) viewportSize() (w, h int) {
410 dw, dh := m.detailsDialogSize()
411 return max(dw-detailsChromeCols, 1), max(dh-detailsChromeRows, 1)
412}
413
414// resizeDetails keeps the viewport and its scrollbar sized to the current
415// dialog dimensions.

Callers 2

resizeDetailsMethod · 0.95
renderDetailsMethod · 0.95

Calls 1

detailsDialogSizeMethod · 0.95

Tested by

no test coverage detected