File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,14 @@ export default class EditorGraph {
32
32
*/
33
33
constructor ( protected editor : Editor ) {
34
34
this . tree = new Tree ( 'SceneTree' ) ;
35
+ this . tree . multipleSelection = true ;
35
36
this . tree . build ( 'SCENE-GRAPH' ) ;
36
37
37
38
// Events
38
39
this . tree . onClick = ( id , data : any ) => {
39
40
this . currentObject = data ;
40
41
this . editor . scenePicker . setGizmoAttachedMesh ( data ) ;
41
- this . editor . core . onSelectObject . notifyObservers ( data ) ;
42
+ this . editor . core . onSelectObject . notifyObservers ( data , undefined , this ) ;
42
43
} ;
43
44
44
45
this . tree . onDblClick = ( id , data : any ) => {
@@ -148,7 +149,7 @@ export default class EditorGraph {
148
149
} ) ;
149
150
150
151
// Observer
151
- this . editor . core . onSelectObject . add ( ( node : Node ) => node && this . tree . select ( node . id ) ) ;
152
+ this . editor . core . onSelectObject . add ( ( node : Node , ev ) => ev . target !== this && node && this . tree . select ( node . id ) ) ;
152
153
}
153
154
154
155
/**
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default class Tree {
25
25
public name : string ;
26
26
public wholerow : boolean = false ;
27
27
public keyboard : boolean = false ;
28
+ public multipleSelection : boolean = false ;
28
29
public element : JSTree = null ;
29
30
30
31
public onClick : < T > ( id : string , data : T ) => void ;
@@ -194,7 +195,7 @@ export default class Tree {
194
195
this . element = $ ( '#' + parentId ) . jstree ( {
195
196
core : {
196
197
check_callback : true ,
197
- multiple : false
198
+ multiple : this . multipleSelection
198
199
} ,
199
200
dnd : {
200
201
use_html5 : true ,
You can’t perform that action at this time.
0 commit comments