W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2013

Re: [DOM3Events] WheelEvent and zoom

From: Masayuki Nakano <masayuki@d-toybox.com>
Date: Sat, 14 Sep 2013 21:04:51 +0900
Message-ID: <523450E3.7000607@d-toybox.com>
To: Rick Byers <rbyers@chromium.org>
CC: www-dom@w3.org
On 2013/09/13 23:11, Rick Byers wrote:
> Thanks for response.  So in what scenarios do you envision a UA ever
> setting deltaZ to non-zero?  Is this just future-proofing for some
> not-yet-popular hardware?

On Mac OS X, native mouse scroll event has deltaZ property. However, as 
far as I know, it's always zero with normal mouse/touchpad.

Additionally, there is no document about the deltaZ's sign on Apple's 
document. Therefore, browsers shouldn't set the value to DOM 
WheelEvent's deltaZ until somebody finds actual device which causes 
non-zero deltaZ value.

> FWIW, I'd LOVE to see D3E define a zoom event.  If Indie UI
> UIManipulationRequestEvent gets traction with implementations then that
> would be even better.  In the meantime we continue to get requests to
> solve this scenario now ;-)
> Thanks,
>     Rick
> On Thu, Sep 12, 2013 at 10:22 PM, Masayuki Nakano <masayuki@d-toybox.com
> <mailto:masayuki@d-toybox.com>> wrote:
>     I don't think browsers should set deltaZ even when the default
>     action is zoom-in/out.
>     The spec just said that "The user's *environment* might be
>     configured to associate zooming with rotation along the z-axis.".
>     So, zooming by Ctrl + y-axis wheel rotation is *just* a default
>     action of some browsers. So, web applications should be able to
>     handle the raw level action such as "Ctrl + y-axis wheel rotation"
>     rather than operation for zoom.
>     If web application needs to handle zoom action, D3E or UI Events
>     should define "zoom" event.
>     On 2013/09/12 22:56, Rick Byers wrote:
>         Hi,
>         We'd like to use the 'wheel' event in blink to communicate zoom
>         requests
>         from the user, distinct from pan (eg. on a trackpad 2-finger
>         scroll vs.
>         pinch).  The spec
>         (http://www.w3.org/TR/DOM-__Level-3-Events/#events-__wheelevents
>         <http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents>) has a
>         suggestion to use deltaZ for this:
>         "The user's environment might be configured to associate vertical
>         scrolling with rotation along the y-axis, horizontal scrolling with
>         rotation along the x-axis, and zooming with rotation along the
>         z-axis."
>         I was looking into doing this in blink
>         (http://crbug.com/289887), but it
>         seems no other browser behaves this way.  IE10 and Firefox appear to
>         instead use deltaY with the ctrl modifier set for zooms (pinch on a
>         trackpad).  Any advice on how this should be handled?  With IE and
>         Firefox already in agreement, I think it's better to follow
>         their lead
>         then to follow the suggestion in the spec.  Perhaps the suggestion
>         should be updated to match implementations?
>         One problem with either approach is that it's not clear how an
>         app can
>         detect that a device that supports zooming distinct from panning is
>         being used.  For example, a mapping site probably wants the
>         wheel on a
>         physical mouse to control zoom (since panning can be
>         accomplished with
>         click and drag), but panning on a trackpad to pan the map instead of
>         zoom it (since pinching can zoom it).  Any tips on how a UA should
>         advertise that zooming is supported?  It's unfortunate, for example,
>         that deltaZ isn't permitted to be undefined when not supported
>         by the
>         input device.
>         Thanks,
>              Rick
>     --
>     Masayuki Nakano <masayuki@d-toybox.com <mailto:masayuki@d-toybox.com>>
>     Manager, Internationalization, Mozilla Japan.

Masayuki Nakano <masayuki@d-toybox.com>
Manager, Internationalization, Mozilla Japan.
Received on Saturday, 14 September 2013 12:05:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:03 UTC