Hi, Nazar- Nazar wrote: | | Antoine, yes, you are right. To be more specific | I use dom.createElement(); element.appendChild() to add rect with text | within it. When user drags rect I want text element to be positioned | with respect to its parent. Can I reach that point having positioned | text element in relative mode ?
Just to be clear, you cannot place a <text> element as a child of a <rect> element. What you can do is to make them both children of a <g> element and position that, and both will move accordingly. Something like: <svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <g transform='translate(100, 50)'> <rect x='0' y='0' width='100' height='20' rx='5' ry='5' fill='yellow' stroke='crimson' stroke-width='2'/> <text x='50' y='16' font-size='18' fill='crimson' text-anchor='middle'>Button</text> </g> </svg> Regards- Doug ----- 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/

