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 --- css/ninja.css | 8 +++++--- js/data/panels-data.js | 7 +++++++ js/ninja.reel/ninja.js | 6 ++++-- js/tools/bindingTool.js | 5 +++-- scss/imports/scss/_Workspace.scss | 13 +++++++++---- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index db2497c8..39acfe60 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -989,10 +989,12 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1 .montage-invisible { display: none; } -body .panel.ws-binding { display: none; -webkit-box-flex-group: 2; } +.panels .panel { display: none; } -body.ws-binding .rightPanelContent .panel { display: none; } +.panels .panel.ws-binding { display: none; -webkit-box-flex-group: 2; } -body.ws-binding .rightPanelContent .panel.ws-binding { display: -webkit-box; } +body.ws-binding .panel.ws-binding { display: -webkit-box; } + +body.ws-default .panel.default { display: -webkit-box; -webkit-box-flex-group: 1; } /*77*/ 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"; } } }, diff --git a/scss/imports/scss/_Workspace.scss b/scss/imports/scss/_Workspace.scss index 06f50a23..c40c5e60 100755 --- a/scss/imports/scss/_Workspace.scss +++ b/scss/imports/scss/_Workspace.scss @@ -6,15 +6,20 @@ //Binding Mode -body .panel.ws-binding { +.panels .panel { + display: none; +} + +.panels .panel.ws-binding { display:none; -webkit-box-flex-group:2; } -body.ws-binding .rightPanelContent .panel { - display:none; +body.ws-binding .panel.ws-binding { + display:-webkit-box; } -body.ws-binding .rightPanelContent .panel.ws-binding { +body.ws-default .panel.default { display:-webkit-box; + -webkit-box-flex-group:1; } \ No newline at end of file -- cgit v1.2.3