On 11/22/11 23:47, Ethan A Merritt wrote:
> On Monday, November 21, 2011 11:36:48 pm plotter@... wrote:
>> while we have the svg box open it may be a good time to point out a
>> minor but rather annoying bug in the mouse coordinate label.
>> If the svg is zoomed (Opera or FFx) the coord values are still correct
>> but the label and it's dot do not match the mouse position.
>> All is OK on zoomed until the scroll bar is moved. Then mouse readout
>> stays at the same point on the graph with the same (correct) coords,
>> rather than staying with the mouse and assuming a new value.
>> Sounds like a detail that was not anticipated.
> Unfortunately, the people who did not anticipate that detail were
> the members of the W3C working group. They left the scrollbar
> coordinate information undefined in the SVG spec. (Or so I concluded
> after Googling. I suppose there may be some very recent addition).
> Many people have hit this same problem with other programs.
The coordinates of the mouse and portion of the graphic that a
particular viewer chooses to look at are not properties of the SVG file,
so I find it logical that this is not in the spec.
Is there anything in the broader html xml specs that define properties
of the view window that is rendered?
The scroll bar position is just an interface detail and has nothing to
do with the spec. , is there no property like viewport that represents
the portion actually rendered?
I seem to recall seeing some such but it may be something else again.
> Each browser handles it differently, so there may not be a single
> universal solution. I borrowed some code that seems to work on
> Firefox and Opera, but it works slightly differently on Chrome.
> I don't know about IE but suspect from the comments on the site where
> I found it that it won't work on IE.
I thought IE could not even render SVG at all. The only option being a
buggy and discontinued Abobe plug-in. Such a platform is not even worth
Thanks for the explanation. I thought this had been missed , you're
obviously on top of it.
This coord read-off is an incredibly useful feature. It's even more
useful when you can zoom in (almost indefinitely) for extra precision.
It's great shame it is flawed.
Could this be made to work with a bit of browser sniffing in the js
code? I may look at adding that locally. This is too useful to miss. Any
best regards, Peter.