--- In [email protected], "Nazar" <[EMAIL PROTECTED]> wrote: > > Hello, > I use DOM to add some of the elements to SVG. Currently I use > element.setAttribute("x", _x); to position element absolutely. > > What I am interested in is > how to position elements relative to its parent element ? >
do you really mean relative to its parent ? i belive its not possible in SVG to NOT position relative to the parent element. for example : <g transform="translate(5 5)"> <rect x="0" y="0" width="100" height="100"/> </g> the rect will be placed at 5,5 which is 0 0 relative to the <g> the only difference here between a <g> and <symbol> or nested <svg> is that you can not position without transform. so: <svg x="5" y="5"> <rect x="0" y="0" width="100" height="100"/> </svg> is the same as the first example. maybe you mean position relative to the previousSibling, which is not possible directly, this is where you can use the tips given by my preposters. hth Holger ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

