[pointerevents] should altitudeAngle default to 0 or pi/2 when not supported? (#320)

patrickhlauke has just created a new issue for https://github.com/w3c/pointerevents:

== should altitudeAngle default to 0 or pi/2 when not supported? ==
splitting this off from https://github.com/w3c/pointerevents/pull/316#discussion_r413854172

in short: in Touch Events, if the current touch is *not* from a stylus that supports altitudeAngle/azimuthAngle, both values are `0`. the theoretical case of a stylus lying completely flat/horizontal on the screen does not seem to actually happen - the stylus tip does not touch the digitizer in that scenario. so `0` seems a safe assumption for "not a stylus, or a stylus that doesn't support position/attitude information". presumably web apps that deal with stylus using Touch Events use this assumption today as well.

for pointer events, currently we also used `0` as default value. now, a more logical/safe approach may well be to say that the default should be either PI/2 (perpendicular stylus), or to provide a clear NaN or similar that signals it's not supported at all.

personally, i think it would be confusing if PE's `altitudeAngle` differed this dramatically from TE's `altitudeAngle`. but i can see the argument about authors simply wanting to plug a property into their code and have it default to something sensible.

would appreciate further thoughts/opinions on this.

Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/320 using your GitHub account

Received on Friday, 24 April 2020 18:05:09 UTC