[DOM3Events] WheelEvent and zoom

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) 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

Received on Thursday, 12 September 2013 13:57:28 UTC