Multi-selection Tutorial
Select an object
There are 3 ways to select an object with cgSceneGraph:
- Programatically :
this.sceneGraph.selectNode(myNode); //this = the main class, ie CGSGScene inherited class - Single click with mouse :
You first need to declare your node as clickable, ie as draggable or resizable:myNode.isDraggable = true; //or myNode.isResizable = true; - Drag selection with mouse :
You also first need to declare your node as clickable, ie as draggable or resizable, and to activate the multi selection via mouse:this.isDragSelectEnabled = true; //this = the main class, ie CGSGScene inherited class //then myNode.isDraggable = true; //or myNode.isResizable = true;
Select several objects in the same time
To multi-select nodes on the scene it's very easy, you just have to set the "allowMultiSelect" property of the CGSGScene to true :
this.allowMultiSelect = true;
- drawing a selection zone on the scene with the mouse cursor
- or just by pressing [Ctrl] key on keyboard while clicking on selectable nodes.
