Closed
Bug 639179
Opened 14 years ago
Closed 14 years ago
Improve kinetic panning
Categories
(Firefox for Android Graveyard :: Panning/Zooming, defect)
Firefox for Android Graveyard
Panning/Zooming
Tracking
(fennec-)
VERIFIED
FIXED
Firefox 5
Tracking | Status | |
---|---|---|
fennec | - | --- |
People
(Reporter: stechz, Assigned: stechz)
References
Details
(Keywords: polish)
Attachments
(5 files, 1 obsolete file)
2.52 KB,
patch
|
stechz
:
review+
|
Details | Diff | Splinter Review |
2.51 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
8.71 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
3.30 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
8.53 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
This problem has been around for a while, but it hadn't been obvious until checkerboarding was a little smoother. We were ignoring drags made by the user until they hit kinetic panning.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #517141 -
Flags: review?(mbrubeck)
Assignee | ||
Updated•14 years ago
|
tracking-fennec: --- → ?
Updated•14 years ago
|
Attachment #517141 -
Flags: review?(mbrubeck) → review+
Updated•14 years ago
|
Comment 2•14 years ago
|
||
Comment on attachment 517141 [details] [diff] [review]
Consecutive pans are jumpy
>+ this._dragBy(this.dX, this.dY);
>+ // dragBy will reset dX and dY values to 0.
I'd like the comment before the code
Attachment #517141 -
Flags: approval2.0+
Updated•14 years ago
|
Whiteboard: [has patch][has review][needs approval] → [has patch][has review][has approval][can land with nit fix]
Comment 3•14 years ago
|
||
Comment on attachment 517141 [details] [diff] [review]
Consecutive pans are jumpy
Please don't land this without sorting out the speed issues
Attachment #517141 -
Flags: approval2.0+ → approval2.0-
Updated•14 years ago
|
Whiteboard: [has patch][has review][has approval][can land with nit fix] → [has patch][has review]
Updated•14 years ago
|
tracking-fennec: ? → 2.0-
Assignee | ||
Comment 4•14 years ago
|
||
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #524703 -
Flags: review?(mbrubeck)
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #524704 -
Flags: review?(mbrubeck)
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #524705 -
Flags: review?(mbrubeck)
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #524706 -
Flags: review?(mbrubeck)
Assignee | ||
Updated•14 years ago
|
Attachment #524702 -
Flags: review+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [has patch][has review]
Comment 9•14 years ago
|
||
Comment on attachment 524703 [details] [diff] [review]
Part 2: Carefully track values sent to dragger
Thanks for breaking up this patch into chunks I can understand even in my current sleep-deprived state. :)
Attachment #524703 -
Flags: review?(mbrubeck) → review+
Updated•14 years ago
|
Attachment #517141 -
Attachment is obsolete: true
Comment 10•14 years ago
|
||
Comment on attachment 524704 [details] [diff] [review]
Part 3: Tapping during kinetic panning stops panning
>+ if (!dragData.isPan()) {
>+ this._kinetic.end();
> this._dragger.dragStop(0, 0, this._targetScrollInterface);
> this._dragger = null;
> } else if (dragData.isPan()) {
Change "else if" to just "else" (and maybe swap the order of the if/else blocks).
>+ if (Date.now() - this._dragStartTime > 300) {
>+ // XXX
>+ this._kinetic._velocity.set(0, 0);
>+ }
Remove the XXX comment and the curly braces.
>+ currentVelocityX = clampFromZero(this._velocity.x + this._acceleration.x * currentTime, 0, 6);
>+ currentVelocityY = clampFromZero(this._velocity.y + this._acceleration.y * currentTime, 0, 6);
This could be Util.clamp(value, -6, 6) instead of clampFromZero(value, 0, 6).
>+ this._velocity.x = clampFromZero((distanceX / swipeLength) + currentVelocityX, Math.abs(currentVelocityX), 6);
>+ this._velocity.y = clampFromZero((distanceY / swipeLength) + currentVelocityY, Math.abs(currentVelocityY), 6);
Please replace "6" with a named constant (in these lines and the previous ones).
>+ resume: function resume() {
>+ if (this._paused)
>+ this._startTimer();
>+ },
Is resume() actually needed?
Attachment #524704 -
Flags: review?(mbrubeck) → review+
Comment 11•14 years ago
|
||
Comment on attachment 524705 [details] [diff] [review]
Part 4: Panning speed determines initial kinetic speed
>+ this._velocity.x = clampFromZero((distanceX / Math.min(swipeLength, lastTime - mb[0].t)) + currentVelocityX, Math.abs(currentVelocityX), 6);
>+ this._velocity.y = clampFromZero((distanceY / Math.min(swipeLength, lastTime - mb[0].t)) + currentVelocityY, Math.abs(currentVelocityY), 6);
You could pull "Math.min(swipeLength, lastTime - mb[0].t))" out into a local variable.
Attachment #524705 -
Flags: review?(mbrubeck) → review+
Updated•14 years ago
|
Attachment #524706 -
Flags: review?(mbrubeck) → review+
Assignee | ||
Comment 12•14 years ago
|
||
> Change "else if" to just "else" (and maybe swap the order of the if/else
> blocks).
OK.
> Remove the XXX comment and the curly braces.
Done.
> This could be Util.clamp(value, -6, 6) instead of clampFromZero(value, 0, 6).
Good call. This works for this code, but not for the later code. Changed here, but still need clampFromZero sadly.
> Please replace "6" with a named constant (in these lines and the previous
> ones).
Done.
> Is resume() actually needed?
Nope! Removed.
> >+ this._velocity.x = clampFromZero((distanceX / Math.min(swipeLength, lastTime - mb[0].t)) + currentVelocityX, Math.abs(currentVelocityX), 6);
> >+ this._velocity.y = clampFromZero((distanceY / Math.min(swipeLength, lastTime - mb[0].t)) + currentVelocityY, Math.abs(currentVelocityY), 6);
>
> You could pull "Math.min(swipeLength, lastTime - mb[0].t))" out into a local
> variable.
Done.
Assignee | ||
Updated•14 years ago
|
Summary: Consecutive pans are jumpy → Improve kinetic panning
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•14 years ago
|
||
Backed out due to massive mobile unittest orange following cedar merge (as the most suspicious candidate):
http://hg.mozilla.org/mozilla-central/pushloghtml?changeset=fe3f7889918b
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Not sure if bug 652219 is related to the changes?
Comment 16•14 years ago
|
||
Re-landed on 2011-04-11:
http://hg.mozilla.org/mozilla-central/pushloghtml?changeset=65740bbb1aa8
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 5
Mozilla/5.0 (Android; Linux armv71; rv6.0a1) Gecko/20110506 Firefox/6.0a1 Fennec/6.0a1
Device: Droid 2
OS: Android 2.2
Mozilla/5.0 (Android; Linux armv71; rv6.0a1) Gecko/20110506 Firefox/6.0a1 Fennec/6.0a1
Device: Thunderbolt
OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•