Hello,
I just joined your SVG group. I'm working on a web application which is based
on SVG. I have a little problem concerning the rotate parameters of a text
element. I want to fetch the first parameter of a rotate function which
represents the rotation angle in degrees.
I use the jQuery SVG plugin of Keith Wood to use jQuery to interact with the
SVG canvas. To fetch the angle I use the indexOf and substring methods of
JavaScript. For instance:
currentFontRotation = currentId.attr('transform');
var bracket = currentFontRotation.indexOf('rotate(');
var comma = currentFontRotation.indexOf(',');
bracket = bracket +7;
currentFontRotationNumber = currentFontRotation.substring(bracket,
comma );
The variable currentId represents the selected text element. Is there a more
clean way to get the angle. I think it's a pretty dirty method to use the
indexOf and substring methods in this case.
Thanks
------------------------------------
-----
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> 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/