Closed
Bug 855783
Opened 12 years ago
Closed 12 years ago
Map gamepad right joystick to zooming
Categories
(Firefox for Android Graveyard :: Toolbar, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(2 files)
(deleted),
patch
|
cwiiis
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
cwiiis
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #730779 -
Flags: review?(chrislord.net)
Assignee | ||
Comment 1•12 years ago
|
||
By lumping this into the same animation runnable as the autoscroll stuff, we can do both simultaneously. e.g. while panning down a long page you can zoom in and out and not interrupt the panning.
Attachment #730780 -
Flags: review?(chrislord.net)
Comment 2•12 years ago
|
||
Comment on attachment 730779 [details] [diff] [review]
Part 1 - s/autoscroll/autonav/
Review of attachment 730779 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #730779 -
Flags: review?(chrislord.net) → review+
Comment 3•12 years ago
|
||
Comment on attachment 730780 [details] [diff] [review]
Part 2 - Adjust zoom on gamepad's right joystick's y-axis
Review of attachment 730780 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! Now let's file a bug to get acceleration on analog stick movement :)
::: mobile/android/base/gfx/JavaPanZoomController.java
@@ +521,5 @@
> + return filterDeadZone(value, range) * MAX_SCROLL;
> + }
> +
> + private float normalizeJoystickZoom(float value, InputDevice.MotionRange range) {
> + return filterDeadZone(value, range) * -MAX_ZOOM_DELTA;
Add a comment that you're negating this value so that pushing up on the right stick zooms in instead of out (I assume that's why this is?)
@@ +1054,5 @@
> + private ImmutableViewportMetrics applyZoomDelta(ImmutableViewportMetrics metrics, float zoomDelta) {
> + float oldZoom = metrics.zoomFactor;
> + float newZoom = oldZoom + zoomDelta;
> + float adjustedZoom = getAdjustedZoomFactor(newZoom / oldZoom);
> + PointF center = new PointF(metrics.getWidth() / 2.0f, metrics.getHeight() / 2.0f);
A comment here to the effect that lacking a focus, always zoom to the center? No biggie.
Attachment #730780 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Chris Lord [:cwiiis] from comment #3)
> Nice! Now let's file a bug to get acceleration on analog stick movement :)
Filed bug 855857.
> Add a comment that you're negating this value so that pushing up on the
> right stick zooms in instead of out (I assume that's why this is?)
Yup. Comment added.
> A comment here to the effect that lacking a focus, always zoom to the
> center? No biggie.
Comment added.
https://hg.mozilla.org/integration/mozilla-inbound/rev/d09726c2fa50
https://hg.mozilla.org/integration/mozilla-inbound/rev/29c3bf1d142e
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d09726c2fa50
https://hg.mozilla.org/mozilla-central/rev/29c3bf1d142e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•