Re: [XBL] Accessing flattened tree parents of a shadow tree

On Thu, 15 Feb 2007, Ian Hickson wrote:
>
> On Thu, 15 Feb 2007, Cameron McCormack wrote:
> > 
> > My example before wasn’t the best, I think.  Here’s a more concrete 
> > one: I want to write a function that will center an element in its 
> > viewport.
> 
> Just wrap the element in two <g> elements, the outer one having a <g 
> x="50%"> and the inner one having <g x="-...px"> where ... is half the 
> bounding box (which you can obtain through the DOM).

It was pointed out to me that, in line with SVG's usual inconsistencies, 
<g> doesn't have an x="" attribute. Please pretend I had used a transform 
attribute with a translate() transform instead.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 15 February 2007 00:51:08 UTC