Closed
Bug 996114
Opened 11 years ago
Closed 11 years ago
[camera] need integrated event handling for all viewfinder views to make pinch-to-zoom work well
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: djf, Unassigned)
Details
The camera app has at least four view classes (controls, hud, zoom-bar and viewfinder) that handle events on the main camera screen. This is problematic for the pinch gestures used for viewfinder zooming. Some problems I see in testing:
- When I try to zoom out, I start with my fingers widely spread and pinch them together. Often, one of my fingers touches the preview button in the lower left or the menu button in the upper right. If that happens, then the two-finger pinch gesture is not recognized.
- Also, when this happens, the button I touched is left in the highlighted state
This is completely easy to reproduce, and I'm certain that QA will find it and file bugs if we don't fix it ourselves.
I suspect the right way to handle this is to consolidate all event handling in the viewfinder view and dispatch events to the controls, hud and zoom bar views as needed.
The fundamental problem, I think, is that getting buttons to highlight on touchstart and then to unhighlight if a single touch turns into a two-finger gesture is hard. So possibly this is related to bug 986752.
I wonder if using a single gesture detector instance on the viewfinder and modifying the hud and controls to respond to tap events and modifying the zoom bar to respond to pan events and modifying the pinch-to-zoom code to use the gesture detector pinch detection would make everything work well.
Reporter | ||
Comment 1•11 years ago
|
||
Needinfo Justin because he did the zoom stuff.
Needinfo Wilson because he's been working on event handling for the shutter button I think.
Also, my suggestion above to try using gesture detector on the viewfinder might not be enough. I think that eventually we are going to want to to start focusing when the user first touches the viewfinder, and then capture the picture when they release. Gesture detector doesn't have events for that, so we couldn't do a pure gesture detector solution.
Flags: needinfo?(wilsonpage)
Flags: needinfo?(jdarcangelo)
Comment 2•11 years ago
|
||
I think a good solution would be to instead of listening for the touch event required for zoom on the viewfinder element, we should listen for them on the <body>. This means that touch events started on the hud or controls will still propagate and cause zoom. We could either relay these touch events through the app event emitter or allow the ViewfinderController to listen to touch events on the body directly, somthing like: `app.el.addEventListener('touchmove', ...)`.
We should probably still listen for clicks required for touch-focus on just the viewfinder element to prevent other propagating clicks from impacting the focus area.
Flags: needinfo?(wilsonpage)
Comment 3•11 years ago
|
||
Since this bug is older, I'm wondering if we wound up doing this "accidentally" in the course of fixing other issues. If so, can we close this bug?
Comment 4•11 years ago
|
||
I believe this issue has since been addressed. Justin please re-open if this isn't the case.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Flags: needinfo?(jdarcangelo)
You need to log in
before you can comment on or make changes to this bug.
Description
•