MCPcopy Create free account
hub / github.com/B33pBeeps/redthread / Pos

Method Pos

internal/app/notes.go:190–201  ·  view source on GitHub ↗

Pos returns an endpoint's SCREEN position (for drawing).

(b *Board)

Source from the content-addressed store, hash-verified

188
189// Pos returns an endpoint's SCREEN position (for drawing).
190func (e *StringEnd) Pos(b *Board) (int, int, bool) {
191 if e.NoteID == "" {
192 // Wall pin — stored in world coords.
193 return ScreenX(e.X, b.Zoom), ScreenY(e.Y, b.Zoom), true
194 }
195 n := b.FindNote(e.NoteID)
196 if n == nil {
197 return 0, 0, false
198 }
199 x, y := n.PinPos(b.Zoom)
200 return x, y, true
201}
202
203// --- Board -------------------------------------------------------------
204

Callers 1

resolveEndpointFunction · 0.80

Calls 4

ScreenXFunction · 0.85
ScreenYFunction · 0.85
FindNoteMethod · 0.80
PinPosMethod · 0.80

Tested by

no test coverage detected