MCPcopy Create free account
hub / github.com/cogentcore/core / scrollInView

Method scrollInView

texteditor/nav.go:841–843  ·  view source on GitHub ↗

Scrolling scrollInView tells any parent scroll layout to scroll to get given box (e.g., cursor BBox) in view -- returns true if scrolled

(bbox image.Rectangle)

Source from the content-addressed store, hash-verified

839// scrollInView tells any parent scroll layout to scroll to get given box
840// (e.g., cursor BBox) in view -- returns true if scrolled
841func (ed *Editor) scrollInView(bbox image.Rectangle) bool {
842 return ed.ScrollToBox(bbox)
843}
844
845// scrollCursorToCenterIfHidden checks if the cursor is not visible, and if
846// so, scrolls to the center, along both dimensions.

Callers

nothing calls this directly

Calls 1

ScrollToBoxMethod · 0.80

Tested by

no test coverage detected