Denis Bohm wrote:
I checked out the lastest CVS and am trying that. The root of the
problem
seems to be that I'm getting negative numbers from MouseEvent.getClientY when I point at the center of the text. This seems wrong. Shouldn't I
only
get positive values since they are with respect to the upper left of the canvas?
If this is before you apply the matrix yes you should only get positive values. There must be something odd about your setup as I have never seen this happen. I'm sure a standalone version of the problem would help
immensely.
The MouseEvent client coordinates seem to be in the coordinate system of the SVG element, not in the coordinate system of the SVG canvas as I had thought. This seems incorrect according to the W3C spec.
It turns out this was a bug that only effected Text (for text we need to get the point in the Text coordinate system so we can figure out which tspan element is the event target - this code accidentally modified the Point stored in the event object), I am really surprised I never noticed this bug before as I often have event handlers on text.
From reading over the W3C specs again it seems to me that:
- SVGLocatable.getScreenCTM should give a transform from element coordinates to physical device coordinates
I've sent a message to the SVG working group you can read that to understand why I'm not certain this is the correct behaviour:
http://lists.w3.org/Archives/Public/www-svg/
The server seems to be down right now so I can't reference the message directly.
- MouseEvent.getScreenX/Y should give physical device coordinates - MouseEvent.getClientX/Y should give canvas coordinates - physical device coordinates == screen coordinates (not top level window coordinates)
Does that sound right?
Yes, mostly.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]