RenderFractionalTranslation and Dismissable#1020
Merged
Hixie merged 1 commit intoflutter:masterfrom Dec 24, 2015
Merged
Conversation
Contributor
Author
|
I can split this into multiple patches if it's too much of a pain to review as-is. There was a bit of a yak shave involved. |
Contributor
Author
|
Oh I forgot to mention one major change in this patch: it changes SlideTransition from working in absolute pixels to working in fractional offsets. There is only one consumer in our repo, but this might affect other people so I'll send a mail about it. |
Contributor
|
LGTM |
- Add RenderFractionalTranslation, a render box that does a translation based on a FractionalOffset. - Make FractionalOffset more like Offset - dx/dy instead of x/y - add /, ~/, % - add .zero - Add alongOffset and alongSize to FractionalOffset so that you can easily apply FractionalOffset to Offsets and Sizes. (Better name suggestions welcome.) - Add transformHitTests boolean to RenderTransform (also on RenderFractionalTranslation), and to classes based on it. - Remove the fade from Dismissable. We can add it back using the builder-with-child pattern like Draggable if we need it. See flutter#1003 for tha feature request. - Rename a bunch of variables in dismissable.dart. - Change the test for dismissable to not handle leftwards dismisses one pixel different from rightwards dismisses, and cleaned up the resulting effect on the test (mostly making sure we had the right number of pumps, with comments explaining what each one was). Fixes flutter#174.
Hixie
added a commit
that referenced
this pull request
Dec 24, 2015
RenderFractionalTranslation and Dismissable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
translation based on a FractionalOffset.
easily apply FractionalOffset to Offsets and Sizes. (Better name
suggestions welcome.)
RenderFractionalTranslation), and to classes based on it.
builder-with-child pattern like Draggable if we need it. See Dismissable's build should be wrappable during a dismiss #1003
for tha feature request.
one pixel different from rightwards dismisses, and cleaned up the
resulting effect on the test (mostly making sure we had the right
number of pumps, with comments explaining what each one was).
Fixes #174.