lukesutton / buckle

A terminal UI library, with auto layouts, styling and other fancy stuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clip elements out of bounds in a layout

lukesutton opened this issue · comments

When too many fixed elements are placed in a layout, some of them will be pushed outside of that layout. For those elements the solver is returning the same offset, meaning they are rendered on top of each other, just outside of the layout. This is not a bug in the solver per se.

Regardless, the layout should not render those elements at all. It should exclude any elements with solved-rects that have an origin outside of it's own bounds.

Any elements that partially lie in the bounds will just get a truncated solved-rect, which they should respect when rendering, and clip their own contents, so no change is required there.

Created via Raycast