Conversation
When swiping near an AwesomeMap's boundaries, allow the content to bounce into place to visually convey the boundary condition to the user. Make this effect available via the BoundaryInterceptor's 'slow' mode. Update PeekInterceptor to independently manage drags into boundaries so that the BoundaryInterceptor can use 'slow' mode. This has the beneficial side-effect of allowing users to drag the first and last items in the list away from list boundaries and have the content snap back upon release, thus visually conveying the boundary condition in that case as well.
@@ -267,7 +285,44 @@ define(function(require) { | |||
|
|||
// Apply acceleration up to the default animation duration. | |||
acceleratedDuration = targetState.duration * Math.min(durationFactorX, durationFactorY); | |||
targetState.duration = Math.max(this._animationDuration, acceleratedDuration); | |||
targetState.duration = Math.max(this._animationDuration / 2, acceleratedDuration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why divided by 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep things relative to configured animationDuration, but to speed it up. This effect should be faster than other snap backs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good place for inline comment. We shall never remember after you move on to Netflix
Get 'er in!!!! Yes! |
@@ -68,7 +68,7 @@ define(function(require) { | |||
} | |||
map.addInterceptor(new BoundaryInterceptor({ | |||
centerContent: true, | |||
mode: 'stop' | |||
mode: { x: 'stop', y: 'slow' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A numerical value might be cooler than 'slow' - very minor thing.
+1 after 1 inline comment added. |
(waiting on mobile) +10 looked good swiping and CR, all tests pass, etc |
+10 looked good swiping on mobile, CR, all tests pass |
QA Resource Approval: +1
Merging into master |
Bounce At Boundaries on Swipe
When swiping near an AwesomeMap's boundaries, allow the content to
bounce into place to visually convey the boundary condition to the
user. Make this effect available via the BoundaryInterceptor's
'slow' mode.
Update PeekInterceptor to independently manage drags into
boundaries so that the BoundaryInterceptor can use 'slow' mode. This
has the beneficial side-effect of allowing users to drag the first and
last items in the list away from list boundaries and have the content
snap back upon release, thus visually conveying the boundary condition
in that case as well.
Unit Tests
How To +10/QA
@lancefisher-wf
@patkujawa-wf
@shanesizer-wf