Changes

Jump to: navigation, search

SVG:Pointer-events

218 bytes added, 02:53, 26 January 2011
Should clipping affect pointer event targeting?
== Should clipping affect pointer event targeting? ==
One of the long running debates in the SVG WG and on www-svg is whether clipping and masking an element should affect intercept pointer events if the event targeting (hit testing)is over an area of the element that is clipping away or masked out. Current (2010) implementations do not take masking into account for hit testing, but Mozilla and Opera do take clipping into account, whereas while Webkit and Batik do not. My (jwatt's) personal opinion is that it's most intuitive for authors to have both clipping and masking affect hit testing by default. In fact I think it would be best for the principle to be that the default behavior is: "if an element affects a given pixel, then a pointer event occurring at that pixel may target the element, but if the element does not affect the pixel, then the pointer event will not target the element."
My (jwatt's) personal opinion is that it's most intuitive for authors to have both clipping and masking affect hit testing by default. In fact I think it would have been best for the default behavior to have been: "if an element affects the color of a given pixel, then pointer events at that location are intercepted by that element, but if the element does not affect the pixel, then pointer events at that location are not intercepted by the element." Text should needs to be a special case, by default. In the typical case where text is displayed at normal reading size, when When a user wishes to click on it to activate a link, or perhaps to select it, it would be unexpected and annoying for the pointer event to go "through" and target whatever is underneath if the click happened to be between two letters, or in through the inside middle of an "o", say, and target whatever is underneath. For the purposes of hit testing text the character cell is used as the fill area for a glyph by default. However, for large text, having event interception depend on the inked area instead of the character cell respond could be what authors want. We should really provide them with some way to pointer events is a better defaultdo that.(Another property they can set?)
== The current property values suck ==
Confirm, emeritus
969
edits

Navigation menu