From ca985ed7031af3f4e76d26fd5b99846620fc5733 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 13 Mar 2012 18:11:48 -0700 Subject: Some code cleanup - removing unused assignments. Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.js | 3 +-- js/controllers/selection-controller.js | 8 ++------ js/lib/drawing/world.js | 8 +++----- 3 files changed, 6 insertions(+), 13 deletions(-) (limited to 'js') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index ab390fc6..f35972b6 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -71,8 +71,7 @@ exports.Breadcrumb = Montage.create(Component, { // This is always the top container which is now hardcoded to body this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); - // This is for the timeline -- Disable it since the timeline should not know about this object - // NJevent('layerBinding',{selected:false ,element:this.container}) + } }, diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index c713b6e5..154fb7f8 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js @@ -90,15 +90,11 @@ exports.SelectionController = Montage.create(Component, { } }, - handleSwitchDocument: { + handleSwitchDocument: { value: function() { if(this.application.ninja.documentController.activeDocument.currentView === "design"){ this._selectedItems = this.application.ninja.selectedElements.slice(0); - if(this._selectedItems.length === 0 ){ - this._isDocument = true; - }else{ - this._isDocument = false; - } + this._isDocument = this._selectedItems.length === 0; NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); } } diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index df24f556..049145ce 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js @@ -351,20 +351,18 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) { return false; }; - this.generateUniqueNodeID = function() - { + this.generateUniqueNodeID = function() { var str = "" + this._nodeCounter; this._nodeCounter++; return str; - } + }; // start RDGE passing your runtime object, and false to indicate we don't need a an initialization state // in the case of a procedurally built scene an init state is not needed for loading data if (this._useWebGL) { rdgeStarted = true; - var id = this._canvas.getAttribute( "data-RDGE-id" ); - this._canvas.rdgeid = id; + this._canvas.rdgeid = this._canvas.getAttribute( "data-RDGE-id" ); g_Engine.registerCanvas(this._canvas, this); RDGEStart( this._canvas ); this._canvas.task.stop() -- cgit v1.2.3