text alignment

821 views
Skip to first unread message

quinn shanahan

unread,
May 4, 2010, 1:08:25 PM5/4/10
to Raphaël
does anyone know how to adjust the text alignment? there doesn't seem
to be any way to change it to something other than centered.

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.

charles thomas

unread,
May 4, 2010, 10:09:42 PM5/4/10
to raph...@googlegroups.com
Quinn

Try these
paper.text(50,350,'Left align text').attr({'font-size':16,'text-anchor':'start' });
paper.text(50,370,'Text aligned').attr({'font-size':16,'text-anchor':'start' });

Also extend your knowledge with other good examples collected from others:
http://www.irunmywebsite.com/raphael/additionalhelp.html?q=rotatintextexactly

Charles

--- On Tue, 5/4/10, quinn shanahan <q.sha...@gmail.com> wrote:

From: quinn shanahan <q.sha...@gmail.com>
Subject: text alignment
To: "Raphaël" <raph...@googlegroups.com>
Received: Tuesday, May 4, 2010, 10:08 AM

does anyone know how to adjust the text alignment? there doesn't seem
to be any way to change it to something other than centered.

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.

Mat Schaffer

unread,
May 4, 2010, 11:58:47 PM5/4/10
to raph...@googlegroups.com
Is there a reason this isn't in the Raphael reference? It works in IE too? If so, awesome! Now I can stop repositioning my text manually using getBBox :-)

-Mat

clvrobj

unread,
May 5, 2010, 9:12:45 PM5/5/10
to Raphaël
Text alignment info can be refer to
http://www.w3.org/TR/SVG/text.html#AlignmentProperties

It works well in IE, I have using this in my code.

On May 5, 11:58 am, Mat Schaffer <m...@schaffer.me> wrote:
> Is there a reason this isn't in the Raphael reference? It works in IE too?
> If so, awesome! Now I can stop repositioning my text manually using getBBox
> :-)
>
> -Mat
>
> On May 4, 2010, at 10:09 PM, charles thomas <charles...@yahoo.com> wrote:
>
> Quinn
>
> Try these
> paper.text(50,350,'Left align
> text').attr({'font-size':16,'text-anchor':'start' });
> paper.text(50,370,'Text aligned').attr({'font-size':16,'text-anchor':'start'
>
> });
>
> Also extend your knowledge with other good examples collected from others:http://www.irunmywebsite.com/raphael/additionalhelp.html?q=rotatintex...
>
> Charles
>
> --- On *Tue, 5/4/10, quinn shanahan <q.shana...@gmail.com>* wrote:
>
> From: quinn shanahan <q.shana...@gmail.com>
> Subject: text alignment
> To: "Raphaël" <raph...@googlegroups.com>
> Received: Tuesday, May 4, 2010, 10:08 AM
>
> does anyone know how to adjust the text alignment? there doesn't seem
> to be any way to change it to something other than centered.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Raphaël" group.
> To post to this group, send an email to
> raph...@googlegroups.com</mc/compose?to=raph...@googlegroups.com>
> .
> To unsubscribe from this group, send email to raphaeljs+
> unsub...@googlegroups.com </mc/compose?to=unsub...@googlegroups.com>.
> For more options, visit this group athttp://groups.google.com/group/raphaeljs?hl=en-GB.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Raphaël" group.
> To post to this group, send an email to raph...@googlegroups.com.
> To unsubscribe from this group, send email to
> raphaeljs+...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/raphaeljs?hl=en-GB.
>
> --
> You received this message because you are subscribed to the Google Groups "Raphaël" group.
> To post to this group, send an email to raph...@googlegroups.com.
> To unsubscribe from this group, send email to raphaeljs+...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/raphaeljs?hl=en-GB.

Quinn Shanahan

unread,
May 6, 2010, 9:42:01 AM5/6/10
to raph...@googlegroups.com
thanks everybody, this solved my problem :) yeah, the raphael doc doesn't seem to indicate that only a partial list of the attributes are displayed. 

2010/5/5 clvrobj <clv...@gmail.com>
Reply all
Reply to author
Forward
0 new messages