From c3452da7c18f73f45e4e6a58918f6459e7915b62 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 15 May 2012 15:02:40 -0700 Subject: Finished skeleton structure for binding. Signed-off-by: Armen Kesablyan --- js/data/panels-data.js | 7 +++++++ js/ninja.reel/ninja.js | 6 ++++-- js/tools/bindingTool.js | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 23bfa1ed..38fa3426 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -12,6 +12,7 @@ exports.PanelsData = Montage.create(Montage, { value: [ { name: "Color", + groups: ["default"], height: 200, minHeight: 200, maxHeight: null, @@ -24,6 +25,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Properties", + groups: ["default", "ws-binding"], minHeight: 200, height: 200, maxHeight: null, @@ -36,6 +38,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Materials", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, @@ -48,6 +51,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Components", + groups: ["default", "ws-binding"], minHeight: 100, height: 200, maxHeight: null, @@ -72,6 +76,7 @@ exports.PanelsData = Montage.create(Montage, { // }, { name: "CSS", + groups: ["default"], minHeight: 195, height: 195, maxHeight: null, @@ -84,6 +89,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Presets", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, @@ -96,6 +102,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "History", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 7ab8e52c..75b2203e 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -27,11 +27,12 @@ exports.Ninja = Montage.create(Component, { return this.workspaceMode; }, set: function(val) { - if( this._workspaceMode === val ) { + if(this._workspaceMode !== val ) { if(this._workspaceMode !== null) { - document.body.classList.remove("ws-" + val); + document.body.classList.remove("ws-" + this._workspaceMode); } document.body.classList.add("ws-" + val); + this._workspaceMode = val; } } }, @@ -166,6 +167,7 @@ exports.Ninja = Montage.create(Component, { prepareForDraw: { value: function() { + this.workspaceMode = "default"; console.log("Loading Ninja --> ", this.ninjaVersion); this.application.ninja = this; diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 282e3408..f9e81223 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -18,13 +18,14 @@ exports.BindingTool = Montage.create(ModifierToolBase, { if (doActivate) { NJevent("enableStageMove"); - document.body.classList.add("ws-binding"); + this.application.ninja.workspaceMode = "binding"; } else { NJevent("disableStageMove"); - document.body.classList.remove("ws-binding"); + debugger; + this.application.ninja.workspaceMode = "default"; } } }, -- cgit v1.2.3