Skip to content

Preliminaries for scroll anchoring - #1710

Merged
abarth merged 2 commits into
flutter:masterfrom
abarth:scroll_anchor
Feb 9, 2016
Merged

abarth merged 2 commits into
flutter:masterfrom
abarth:scroll_anchor

Conversation

@abarth

@abarth abarth commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

These patches are warmups for adding support for scroll anchors.

@abarth

abarth commented Feb 9, 2016

Copy link
Copy Markdown
Contributor Author

@Hixie @HansMuller

if (scrollVelocity.dx.abs() > _kMinFlingVelocity) {
final int selectionDelta = scrollVelocity.dx > 0 ? -1 : 1;
if (scrollVelocity.abs() > _kMinFlingVelocity) {
final int selectionDelta = scrollVelocity.sign.round();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

truncate() is probably more precisely the semantic we're going for here than round()

@Hixie

Hixie commented Feb 9, 2016

Copy link
Copy Markdown
Contributor

lgtm

@abarth
abarth force-pushed the scroll_anchor branch 2 times, most recently from 589e3ef to 186a10e Compare February 9, 2016 17:58

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paintOffset

These classes now share more code and have feature parity.
abarth added a commit that referenced this pull request Feb 9, 2016
Preliminaries for scroll anchoring
@abarth
abarth merged commit 7458ed2 into flutter:master Feb 9, 2016
@abarth
abarth deleted the scroll_anchor branch February 9, 2016 18:37
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants