I am using using JavaScript library Kinetic.js
for HTML5 canvas.
Here is the method stage.get()
to get objects from stage (canvas). I have assigned the id's or class names to each object
if I get the object by id var obj = stage.get('#obj_id')
it works but If try to get the multiple objects by class name var objs = stage.get('.obj_class_name')
it returns an empty []
object
How I can get multiple objects from stage .
stage.get('.object_name')
should work, as specified here: html5canvastutorials.com/kineticjs/… – Larinestage.get('.object_name')
should work if you've defined thename
parameter for each object. If you could provide a bit more context and/or a jsfiddle of your code. – Invective