- From: Jonathan Watt <jwatt@jwatt.org>
- Date: Wed, 07 Mar 2007 18:40:40 +0100
- To: www-svg@w3.org
Hi all, When I implemented SVGZoomEvent for Mozilla I did not implement: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey or relatedNode [1] because SVG 1.1 says SVGZoomEvent inherits from events::UIEvent so there's no inherited interface that defines these properties. Even if they could somehow be implemented, screenX, screenY, clientX and clientY wouldn't really provide you with the information you want. When reacting to a zoom event you want to be able to reposition the children of the target <svg> element relative to the edges of the <svg> element. To do that you want to know the coordinates in user space (the user space established _by_ the target <svg> element) of the top-left-most and bottom-right-most points still visible in the <svg> element after the zoom. With that information (which you'd have as an SVGRect if my previous email [2] is accepted) you could also easily obtain the center point making any information screenX, screenY, clientX and clientY might provide redundant. Besides that the text "center of the zoom area" is unclear, and having coordinates in "screen" or viewport coordinates is not useful. As for altKey, ctrlKey, shiftKey and metaKey they don't seem to belong on an SVGZoom event. Finally, relatedNode is the same as event.target so it's redundant. I suggest that an errata item remove (or as close to remove as possible) any mention of the MouseEvent properties screenX et. al. from text pertaining to SVGZoomEvent. Regards, Jonathan [1] http://www.w3.org/TR/SVG11/script.html#InterfaceSVGZoomEvent [2] http://lists.w3.org/Archives/Public/www-svg/2007Mar/0002.html
Received on Wednesday, 7 March 2007 17:41:45 UTC