Re: z-index control and relative coordinates: separated at birth?

mawrya <[email protected]> Thu, 7 Jan 2010 13:43:32 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <[email protected]>
> >> It seems that SVG doesn't let you have it both ways - you can either
> >> have relative coordinates, or you can have control of layers / z-
> >> index, not both at once.
>
> Right.
>
> This is something the SVG WG has been aware of for a while. Two things were added to the SVG 1.2 drafts to fix this.
>
> The first was the ref() transform value, so for example you could specify the width, height, font size of a widget in one coordinate system while describing the anchor of the rectangle by saying "that value over there in another part of the tree".http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#transform-ref
>
> The second thing was Overlaying graphics, a way to say "this is on top of everything".http://www.w3.org/TR/2004/WD-SVG12-20041027/painting.html#overlay
>
> Of those, overlay made it into SVG Tiny 1.2 (but only for the video element)http://www.w3.org/TR/SVGTiny12/multimedia.html#compositingBehaviorAtt...
>
> and ref() also made it inhttp://www.w3.org/TR/SVGTiny12/coords.html#transform-ref
>
> None of which helps people coding to SVG 1.1 (unless you add a script library to backport the functionality) but I did want to show that the SVG WG is aware of the issue and is trying to address it.
>

Thanks Chris. It only took one line of XPath and six lines of
javascript to walk up the ancestor-or-self XPath axis, gather up all
the @transform attribute values and assign them to the @transform of
the moved popup group. It will hold me over until SVG 1.2 makes it's
debut.

-mawrya