From ec6759f9821a5647905617e3992fdda1cea390ef Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 26 Jun 2012 17:17:43 -0700 Subject: Binding View - Hide in Live Preview Signed-off-by: Armen Kesablyan --- js/tools/bindingTool.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/tools') diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 1e1c9e5b..3f8e960f 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -33,6 +33,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, { { NJevent("enableStageMove"); this.application.ninja.workspaceMode = "binding"; + this.application.ninja.stage.bindingView.hide = false; if (this.application.ninja.selectedElements.length !== 0 ) { if(typeof(this.application.ninja.selectedElements[0].controller) !== "undefined") { this.selectedComponent = this.application.ninja.selectedElements[0].controller; @@ -47,6 +48,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, { NJevent("disableStageMove"); this.application.ninja.workspaceMode = "default"; this.selectedComponent = null; + this.application.ninja.stage.bindingView.hide = true; } } -- cgit v1.2.3 From 9add37d85a9d90541daae8ad5316388c4d9a9da4 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 28 Jun 2012 13:21:11 -0700 Subject: Binding View - Bug fix After save corrupts doom and breaks binding view Signed-off-by: Armen Kesablyan --- js/tools/bindingTool.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'js/tools') diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 3f8e960f..3704a451 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -12,17 +12,17 @@ SelectionTool = require("js/tools/SelectionTool").SelectionTool; exports.BindingTool = Montage.create(ModifierToolBase, { drawingFeedback: { value: { mode: "Draw2D", type: "" } }, - _selectedComponent: { + _selectedElement: { value: null }, - selectedComponent: { + selectedElement: { get:function() { - return this._selectedComponent; + return this._selectedElement; }, set: function(val) { - this._selectedComponent = val; - this.application.ninja.stage.bindingView.selectedComponent = val; + this._selectedElement = val; + this.application.ninja.stage.bindingView.selectedElement = val; } }, @@ -36,7 +36,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, { this.application.ninja.stage.bindingView.hide = false; if (this.application.ninja.selectedElements.length !== 0 ) { if(typeof(this.application.ninja.selectedElements[0].controller) !== "undefined") { - this.selectedComponent = this.application.ninja.selectedElements[0].controller; + this.selectedElement = this.application.ninja.selectedElements[0]; } else { this.selectedComponent = null; } @@ -87,12 +87,12 @@ exports.BindingTool = Montage.create(ModifierToolBase, { this.doSelection(event); if (this.application.ninja.selectedElements.length !== 0 ) { if(this.application.ninja.selectedElements[0].controller) { - this.selectedComponent = this.application.ninja.selectedElements[0].controller; + this.selectedElement = this.application.ninja.selectedElements[0]; } else { - this.selectedComponent = null; + this.selectedElement = null; } } else { - this.selectedComponent = null; + this.selectedElement = null; } this._isDrawing = false; } -- cgit v1.2.3