Re: Pointer Events in SVG

Adding createSVGPoint and matrixTransform to a future tiny standard sounds
like a pretty big deal to
me, just to achieve finding out where the pointer-event happened. I agree
that dragging something around is a very common use-case, and it also relies
on performance - always having to run through these lines of script
"onmousemove" looks quite expensive to me, for example when looking at the
dragging demo that was linked in the article mentioned before.

Instead, could it be possible to add the right x and y properties to the
event itself? So that in addition to things like clientX/clientY,
pageX/pageY, screenX/screenY, x/y the event could also have another property
in regard to the SVG viewBox? viewBoxX/viewBoxY? ;-)

It could be easy and quite lightweight to ask for that member on an incoming
event object, so having the fallback with the mentioned methods would still
be possible (if the methods themselves are available).

Regards,
Daniel


2007/10/30, Dave Raggett <dsr@w3.org>:
>
>
> A further point is that the missing methods are important when you
> want to use scripts to enable objects to be dragged around the
> display with mouse move events, see, e.g. Jeff Schiller's article
> on enabling dragging in SVG:
>
>
> http://blog.codedread.com/archives/2005/12/21/how-to-enable-dragging-in-svg/
>
> It would be a great shame if we couldn't support dragging for rich
> web apps written in SVGT 1.2. The current draft has everything you
> need including mousemove events, and just lacks the createSVGPoint
> and matrixTransform methods.
>
> Of course it would be even better if there was a simpler way to
> map the mouse event's screen coordinates back to user coordinates.
>
>   Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
>
> On Tue, 30 Oct 2007, Dave Raggett wrote:
>
> > Thanks for raising the issue of the missing methods.
>

Received on Wednesday, 31 October 2007 00:08:50 UTC