Skip to content

Commit

Permalink
Merge pull request #40 from TheVindicators/Select-all
Browse files Browse the repository at this point in the history
Select all
  • Loading branch information
cade9522 authored Oct 25, 2017
2 parents abeb014 + b2ed59a commit 7827261
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions app/static/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,22 +384,36 @@ Editor.prototype = {
//

select: function ( object ) {

if ( this.selected === object ) return;

if(this.scene == object || this.scene === object.parent){
var uuid = null;

if ( object !== null ) {

uuid = object.uuid;

}

var uuid = null;

if ( object !== null ) {

uuid = object.uuid;
this.selected = object;

}
this.config.setKey( 'selected', uuid );
this.signals.objectSelected.dispatch( object );

} else {
var uuid = null;

this.selected = object;
if ( object.parent !== null ) {

uuid = object.parent.uuid;

}

this.config.setKey( 'selected', uuid );
this.signals.objectSelected.dispatch( object );
this.selected = object.parent;

this.config.setKey( 'selected', uuid );
this.signals.objectSelected.dispatch( object.parent );
}
},

selectById: function ( id ) {
Expand Down

0 comments on commit 7827261

Please sign in to comment.