Summary: This SVG document has JavaScript to show more information when the mouse is over a data point, manipulating the visibility property of specific elements in the SVG document. This script works in Adobe SVG plugin and Firefox 2. Steps to reproduce: Go to http://www.sensoryoutput.com/external/freshview_week.svg and hover cursor over a data point. Expected results: Box with text about data node should appear. Actual results: No box with text about data node appears. To my knowledge, this has never worked in the SVG implementation of WebKit.
It's getting a null value here: tooltip.setAttributeNS(null,"transform","translate("+(parseInt(label.getAttributeNS(null,"x"))-40)+","+(parseInt(label.getAttributeNS(null,"y"))-23)+")") in graph.js Not sure why yet.
It turns out that: cible.getAttribute("id") returns "undefined" Not sure why yet.
It looks like this is actually a problem with <use>. Changing title accordingly.
(In reply to comment #3) > It looks like this is actually a problem with <use>. Changing title > accordingly. > Hmm it also doesn't work in Opera/Batik. Opera silently fails, Batik displays "Can not convert to null value". WebKit says "(event handler):Value undefined (result of expression cible.getAttribute) is not object.". Please provide a reduced testcase, what's really going on there. Greetings, Niko
This now works in ToT.
Created attachment 12963 [details] <use> breaks scripting
Created attachment 12964 [details] works if <use> not in script
#6 reduced testcase: demonstrates that including <use> breaks scripting all 3 boxes visible, they should be hidden. #7 reduced testcase: as #6 but excluding reference to <use> works 2 boxes hidden, third <use> box wasn't scripted to be hidden
suggest changing Summary to: getElementById broken for <use> and removing Keywords: NeedsReduction awaiting editbugs
Okay, I finally found out what's going on here. The freshview_week.svg is broken and relies on bugs in the other SVG implementations. graph.js expects the "cible" to be of type SVGUseElement, though the SVG spec clearly says that the events should be dispatched to the corresponding SVGElementInstance and NOT the SVGUseElement. Easy fix to get it working in Safari: function path_show(evt) { cible = evt.target.correspondingUseElement ... instead of "cible = evt.target" So this is definately a "won't fix" bug. Though the reduction in #6 / #7 highlights a different bug, keeping this bug open. Niko
#11 Nikolas, should I open a separate bug? ie for #6 & #7
(In reply to comment #12) > #11 > > Nikolas, should I open a separate bug? > ie for #6 & #7 > Hey Jay, i don't think that's needed. I plan to open a master bug anyway which should fix all currently reported <use> problems. I'll mark this bug and others (12926, 12916, 12917) as duplicates of the new master bug. Stay tuned :-) Niko
*** This bug has been marked as a duplicate of 12936 ***