Class Kinetic.Container
Defined in: kinetic.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Container constructor.
|
Method Attributes | Method Name and Description |
---|---|
get(selector)
return an array of nodes that match the selector.
|
|
get children
|
|
isAncestorOf(node)
determine if node is an ancestor
of descendant
|
|
remove all children
|
Class Detail
Kinetic.Container()
Container constructor. Containers are used to contain nodes or other containers
Method Detail
get(selector)
return an array of nodes that match the selector. Use '#' for id selections
and '.' for name selections
ex:
var node = stage.get('#foo'); // selects node with id foo
var nodes = layer.get('.bar'); // selects nodes with name bar inside layer
- Parameters:
- {String} selector
getChildren()
get children
isAncestorOf(node)
determine if node is an ancestor
of descendant
- Parameters:
- {Kinetic.Node} node
removeChildren()
remove all children