Two possible solutions
tr.node.nodeName
or tr.node.tagName
How to get the shape name of elements defined using Raphael.js
-
30-06-2023 - |
Frage
For example,I define the following element:
var tr=paper.rect(40,80,100,60);
var tp=paper.circle(84,200,50);
var te=paper.ellipse(84,300,70,35);
How can I know that tr is a rect, tp is a circle and te is an ellipse ? In fact I want to classified the different shapes. Is there any way to get the shape name of the element or classified them by adding some particular properties?
Than you for any help!
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow