Reputation: 39
Given an arbitrary array of kineticjs objects there a way to get the object type?
var ary = new Array();
ary[0] = "Circle Obj";
ary[1] = "rect Obj";
ary[2] = "arc Obj";
ary[0] = "Circle Obj";
Please comment
Upvotes: 0
Views: 46
Reputation: 105035
Yes, use myObject.className
ary[0]=new Kinetic.Circle({...});
console.log(ary[0].className); // returns "Circle"
Upvotes: 1