var text = new Kinetic.Text({
x: a,
y: b,
text: {"name":"WAERK","key":"","description":"SD Document Currency"}.name,
fontSize: d,
fontFamily: 'Calibri',
fill: e ,
id:"text"+textcount++
});
On clicking the text element I want "description":"SD Document Currency" in popup please help me.
You have to store the information if you want to retrieve it. For example,
or
text.setAttr('description', description);
. (Note, using the setAttr(s) method allows us to listen for thedescriptionChange
event on the Text object if you ever need to.) You can then retrieve the description withtext.getAttr('description');
ortext.attrs.description;
. Then just pass that intoalert
or whatever pop-up you're using.