aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-15 15:02:40 -0700
committerArmen Kesablyan2012-05-15 15:02:40 -0700
commitc3452da7c18f73f45e4e6a58918f6459e7915b62 (patch)
tree3c29d3fddb30fab5f1087f94f19d453d13151b4a /js
parent9e6c0a247bd2f14d92278bcd97fff40277b71667 (diff)
downloadninja-c3452da7c18f73f45e4e6a58918f6459e7915b62.tar.gz
Finished skeleton structure for binding.
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/data/panels-data.js7
-rwxr-xr-xjs/ninja.reel/ninja.js6
-rw-r--r--js/tools/bindingTool.js5
3 files changed, 14 insertions, 4 deletions
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, {
12 value: [ 12 value: [
13 { 13 {
14 name: "Color", 14 name: "Color",
15 groups: ["default"],
15 height: 200, 16 height: 200,
16 minHeight: 200, 17 minHeight: 200,
17 maxHeight: null, 18 maxHeight: null,
@@ -24,6 +25,7 @@ exports.PanelsData = Montage.create(Montage, {
24 }, 25 },
25 { 26 {
26 name: "Properties", 27 name: "Properties",
28 groups: ["default", "ws-binding"],
27 minHeight: 200, 29 minHeight: 200,
28 height: 200, 30 height: 200,
29 maxHeight: null, 31 maxHeight: null,
@@ -36,6 +38,7 @@ exports.PanelsData = Montage.create(Montage, {
36 }, 38 },
37 { 39 {
38 name: "Materials", 40 name: "Materials",
41 groups: ["default"],
39 minHeight: 100, 42 minHeight: 100,
40 height: 100, 43 height: 100,
41 maxHeight: null, 44 maxHeight: null,
@@ -48,6 +51,7 @@ exports.PanelsData = Montage.create(Montage, {
48 }, 51 },
49 { 52 {
50 name: "Components", 53 name: "Components",
54 groups: ["default", "ws-binding"],
51 minHeight: 100, 55 minHeight: 100,
52 height: 200, 56 height: 200,
53 maxHeight: null, 57 maxHeight: null,
@@ -72,6 +76,7 @@ exports.PanelsData = Montage.create(Montage, {
72// }, 76// },
73 { 77 {
74 name: "CSS", 78 name: "CSS",
79 groups: ["default"],
75 minHeight: 195, 80 minHeight: 195,
76 height: 195, 81 height: 195,
77 maxHeight: null, 82 maxHeight: null,
@@ -84,6 +89,7 @@ exports.PanelsData = Montage.create(Montage, {
84 }, 89 },
85 { 90 {
86 name: "Presets", 91 name: "Presets",
92 groups: ["default"],
87 minHeight: 100, 93 minHeight: 100,
88 height: 100, 94 height: 100,
89 maxHeight: null, 95 maxHeight: null,
@@ -96,6 +102,7 @@ exports.PanelsData = Montage.create(Montage, {
96 }, 102 },
97 { 103 {
98 name: "History", 104 name: "History",
105 groups: ["default"],
99 minHeight: 100, 106 minHeight: 100,
100 height: 100, 107 height: 100,
101 maxHeight: null, 108 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, {
27 return this.workspaceMode; 27 return this.workspaceMode;
28 }, 28 },
29 set: function(val) { 29 set: function(val) {
30 if( this._workspaceMode === val ) { 30 if(this._workspaceMode !== val ) {
31 if(this._workspaceMode !== null) { 31 if(this._workspaceMode !== null) {
32 document.body.classList.remove("ws-" + val); 32 document.body.classList.remove("ws-" + this._workspaceMode);
33 } 33 }
34 document.body.classList.add("ws-" + val); 34 document.body.classList.add("ws-" + val);
35 this._workspaceMode = val;
35 } 36 }
36 } 37 }
37 }, 38 },
@@ -166,6 +167,7 @@ exports.Ninja = Montage.create(Component, {
166 167
167 prepareForDraw: { 168 prepareForDraw: {
168 value: function() { 169 value: function() {
170 this.workspaceMode = "default";
169 console.log("Loading Ninja --> ", this.ninjaVersion); 171 console.log("Loading Ninja --> ", this.ninjaVersion);
170 172
171 this.application.ninja = this; 173 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, {
18 if (doActivate) 18 if (doActivate)
19 { 19 {
20 NJevent("enableStageMove"); 20 NJevent("enableStageMove");
21 document.body.classList.add("ws-binding"); 21 this.application.ninja.workspaceMode = "binding";
22 22
23 } 23 }
24 else 24 else
25 { 25 {
26 NJevent("disableStageMove"); 26 NJevent("disableStageMove");
27 document.body.classList.remove("ws-binding"); 27 debugger;
28 this.application.ninja.workspaceMode = "default";
28 } 29 }
29 } 30 }
30 }, 31 },