Skip to content

feat: add overflow option to Pin widget to allow content beyond boundaries - #366

Merged
mmstick merged 1 commit into
pop-os:masterfrom
john-basilio:feat/pin-overflow-option
Jul 23, 2026
Merged

feat: add overflow option to Pin widget to allow content beyond boundaries#366
mmstick merged 1 commit into
pop-os:masterfrom
john-basilio:feat/pin-overflow-option

Conversation

@john-basilio

Copy link
Copy Markdown

Adds an overflow bool field to the Pin widget with a corresponding .overflow() builder method.

By default, Pin subtracts its position from the available layout space, which causes content to be clipped or repositioned when near the boundaries of its container The images below demonstrates it:

Here's what the node box and the text should look, consistently.
image

Here's what it looks like with the current Pin.
image
image

With .overflow(true), it skips this subtraction, giving the content the full available space regardless of position.
image

This is useful for infinite canvas or free-form layout scenarios where pinned content should be able to move freely without being constrained by its screen position.

You can check out my repo's canvas.rs where pin() was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants