Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds logic to the
Viewport
component (and some auxiliary changes for theScrolled
component) that allows move familiar scrolling conventions.Viewports can now specify horizontal and vertical anchors for the view which indicate where the initial position of the viewport should be relative to the component, and the fixed point when the bounds of the view change.
In addition the unimplemented
stay_inside
option is now implemented: when changing the bounds of the viewport the view will try to stay within the bounds of the viewed component, if possible.This PR is built on #205, since it makes the interactive testing easier, but is technically orthogonal to it.
Tests included.