Hi, > -----Ursprüngliche Nachricht----- > Von: Thomas DeWeese [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 25. Februar 2004 14:51 > An: Batik Users > Betreff: Re: Updating attributes for referenced elements > > > REH Wolfgang wrote: > > > I just updated from 1.5 to 1.5.1 but discovered a > problem. In our > > SVG we've got some elements using symbols from a template > SVG via the > > use-tag. If I change an attribute of such a 'use'ed element > the change > > is not drawn. Only after changing the xlink:href attribute the > > previously changed style or position take effect. In the previous > > version of batik that was working with no problems. > > Hi Wolfgang, > > When you say you change the 'use'ed element you are > changing the 'style' attribute on the 'use' element and > having it 'cascade' into the symbol content?
Yes, that's what I want. I want to change the colour of an element that is pulled in from another document via 'use'. The symbol itself doesn't have any colouring (no 'stroke:rgb(r,g,b)' in the 'style' attribute). The colour should be inherited from the 'style' attribute of the 'use' element. Isn't that what inheritance in SVG is about? > If so then yes, this was turned off in 1.5.1, but it was > pretty badly broken in 1.5. In particular when this happened > the used content was updated using the 'host' document's CSS > style sheets. If you really want the old behavior back the > change is _very_ minor, in SVGUseElementBridge:197 replace > 'isLocal' with 'true'. I'll try that. Or is there another way to get what I described above? > > > PS: All changes to the DOM-tree are made via calls to like > > > Canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new > > SetElementAttribute(UseElement, MyConstants.StyleAttribute, Style)); > > This is a pretty heavy weight way to update attributes, I > hope you don't do this a lot! > Well, I tried to change the attributes directly, but then the Canvas won't redraw the elements until the mouse is moved. That's why I queue the attribute updates to the UpdateManager. I didn't find a way without that overhead. Regards, Wolfgang Reh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]