Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify raphael text?

Tags:

After instantiating Raphael text like so

var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!");

how do I go about then modifying that text?

t.text = "test"; did not work for me.

like image 258
Xavier Avatar asked Jan 31 '10 17:01

Xavier


1 Answers

You must use the .attr()docs method to change the text of an existing text element

like this

t.attr('text','new text here');
like image 187
Gabriele Petrioli Avatar answered Sep 19 '22 17:09

Gabriele Petrioli