Cameron McCormack wrote:
Hi.

With this test document:

<svg xmlns="http://www.w3.org/2000/svg";
xmlns:xlink="http://www.w3.org/1999/xlink"; width="400" height="400">
<defs>
<rect id="a" width="50" height="50" fill="red"
onclick="window.alert('hi')"/>
</defs>
<use xlink:href="#a" x="100" y="100"/>
<rect x="20" y="20" width="50" height="50" fill="blue"
onclick="window.alert('lo')"/>
</svg>


I find that the used rect (the red one) doesn't have its onclick event
fired, while the blue one does. Is this a bug?

Well, yes and no. If we fire that event the event target should be an ElementInstance. Since as you know we don't implement the ElementInstance stuff it would be difficult to do this :) It isn't clear to me which is the lesser of the two evils - not firing the event, or firing the event with the cloned instance as target.

Anyone willing to vote on this :)

If this has already
been fixed in CVS (I'm using a month or so old copy) can someone point
me to which bit of code fixed it?  If it hasn't been fixed, any hints on
which part of the code needs modification?

The switch is pretty straight forward, at the end of batik.bridge.ScriptingEnvironment.addScriptingListeners

  It needs code akin to the code at the end of
batik.css.engine.CSSEngine.propagateChanges where it calls
'CSSEngine.getImportedChild' to get the 'use' element tree
before doing the normal DOM children.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to