aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-11 15:03:10 -0700
committerArmen Kesablyan2012-05-11 15:03:22 -0700
commitc80e7df1702dff09b5cc8447ab0619747fed2024 (patch)
treeed45ae752fd1427e03e39d8174df44de00a45f83
parente3efa52c409ef05c28bfc5f1f25a750b5132c3bd (diff)
downloadninja-c80e7df1702dff09b5cc8447ab0619747fed2024.tar.gz
created the initial environment requirements for workspace to be manipulated.
Signed-off-by: Armen Kesablyan <armen@motorola.com>
-rwxr-xr-xcss/ninja.css10
-rw-r--r--js/data/panels-data.js26
-rwxr-xr-xjs/ninja.reel/ninja.js18
-rwxr-xr-xjs/panels/Panel.reel/Panel.js10
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html20
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js16
-rw-r--r--js/panels/binding.reel/binding.css0
-rw-r--r--js/panels/binding.reel/binding.html27
-rw-r--r--js/panels/binding.reel/binding.js11
-rw-r--r--js/panels/objects.reel/objects.css0
-rw-r--r--js/panels/objects.reel/objects.html27
-rw-r--r--js/panels/objects.reel/objects.js7
-rw-r--r--js/tools/bindingTool.js23
-rwxr-xr-xscss/imports/scss/_MainWindow.scss4
-rwxr-xr-xscss/imports/scss/_Workspace.scss19
-rwxr-xr-xscss/ninja.scss1
16 files changed, 212 insertions, 7 deletions
diff --git a/css/ninja.css b/css/ninja.css
index 1531b76c..ebf16395 100755
--- a/css/ninja.css
+++ b/css/ninja.css
@@ -118,9 +118,9 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co
118 118
119#sceneBar { height: 70px; background-color: #474747; } 119#sceneBar { height: 70px; background-color: #474747; }
120 120
121#mainContainer .rulerTop { display: none; background: gray url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; border-right: 11px solid black; } 121#mainContainer .rulerTop { display: none; background: gray url("../images/temp/ruler-top.png"); height: 15px; margin-bottom: 0px; }
122 122
123.rulerLeft { display: none; background: gray url("../images/temp/ruler-left.png"); width: 16px; border-bottom: 11px solid black; } 123.rulerLeft { display: none; background: gray url("../images/temp/ruler-left.png"); width: 16px; }
124 124
125#stateBar { height: 20px; background-color: #282828; margin-bottom: 0px; } 125#stateBar { height: 20px; background-color: #282828; margin-bottom: 0px; }
126 126
@@ -997,4 +997,10 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1
997 997
998.montage-invisible { display: none; } 998.montage-invisible { display: none; }
999 999
1000body .panel.ws-binding { display: none; }
1001
1002body.ws-binding .rightPanelContent .panel { display: none; }
1003
1004body.ws-binding .rightPanelContent .panel.ws-binding { display: block; }
1005
1000/*77*/ 1006/*77*/
diff --git a/js/data/panels-data.js b/js/data/panels-data.js
index f613a3be..7fa22995 100644
--- a/js/data/panels-data.js
+++ b/js/data/panels-data.js
@@ -105,6 +105,32 @@ exports.PanelsData = Montage.create(Montage, {
105 open: true, 105 open: true,
106 modulePath: "js/panels/history-panel/history.reel", 106 modulePath: "js/panels/history-panel/history.reel",
107 moduleName: "History" 107 moduleName: "History"
108 },
109 {
110 name: "Binding",
111 groups: ["ws-binding"],
112 minHeight: 100,
113 height: 100,
114 maxHeight: null,
115 flexible: true,
116 collapsed: true,
117 scrollable: true,
118 open: true,
119 modulePath: "js/panels/binding.reel",
120 moduleName: "BindingPanel"
121 },
122 {
123 name: "Objects",
124 groups: ["ws-binding"],
125 minHeight: 100,
126 height: 100,
127 maxHeight: null,
128 flexible: true,
129 collapsed: true,
130 scrollable: true,
131 open: true,
132 modulePath: "js/panels/objects.reel",
133 moduleName: "ObjectsPanel"
108 } 134 }
109 ] 135 ]
110 } 136 }
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index edc1efa4..7ab8e52c 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -18,6 +18,24 @@ exports.Ninja = Montage.create(Component, {
18 value: null 18 value: null
19 }, 19 },
20 20
21 _workspaceMode: {
22 value: null
23 },
24
25 workspaceMode: {
26 get: function() {
27 return this.workspaceMode;
28 },
29 set: function(val) {
30 if( this._workspaceMode === val ) {
31 if(this._workspaceMode !== null) {
32 document.body.classList.remove("ws-" + val);
33 }
34 document.body.classList.add("ws-" + val);
35 }
36 }
37 },
38
21 toolsData: { value: null }, 39 toolsData: { value: null },
22 appData: { value: AppData }, 40 appData: { value: AppData },
23 41
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js
index 613bef4b..bd9b4e2f 100755
--- a/js/panels/Panel.reel/Panel.js
+++ b/js/panels/Panel.reel/Panel.js
@@ -13,6 +13,10 @@ exports.Panel = Montage.create(Component, {
13 value: "Panel" 13 value: "Panel"
14 }, 14 },
15 15
16 groups: {
17 value: []
18 },
19
16 _collapsed: { 20 _collapsed: {
17 value: false 21 value: false
18 }, 22 },
@@ -119,6 +123,12 @@ exports.Panel = Montage.create(Component, {
119 this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create(); 123 this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create();
120 } 124 }
121 125
126 if(this.groups) {
127 this.groups.forEach(function(className) {
128 this.element.classList.add(className);
129 }.bind(this));
130 }
131
122 if(this.modulePath && this.moduleName) { 132 if(this.modulePath && this.moduleName) {
123 // Load the slot content 133 // Load the slot content
124 var that = this; 134 var that = this;
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html
index ccefd3ae..f1d1a855 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer.reel/PanelContainer.html
@@ -62,6 +62,20 @@
62 } 62 }
63 }, 63 },
64 64
65 "panel_7": {
66 "prototype": "js/panels/Panel.reel",
67 "properties": {
68 "element": {"#": "panel_7"}
69 }
70 },
71
72 "panel_8": {
73 "prototype": "js/panels/Panel.reel",
74 "properties": {
75 "element": {"#": "panel_8"}
76 }
77 },
78
65 "owner": { 79 "owner": {
66 "prototype": "js/panels/PanelContainer.reel", 80 "prototype": "js/panels/PanelContainer.reel",
67 "properties": { 81 "properties": {
@@ -73,7 +87,9 @@
73 "panel_3": {"@": "panel_3"}, 87 "panel_3": {"@": "panel_3"},
74 "panel_4": {"@": "panel_4"}, 88 "panel_4": {"@": "panel_4"},
75 "panel_5": {"@": "panel_5"}, 89 "panel_5": {"@": "panel_5"},
76 "panel_6": {"@": "panel_6"} 90 "panel_6": {"@": "panel_6"},
91 "panel_7": {"@": "panel_7"},
92 "panel_8": {"@": "panel_8"}
77 }, 93 },
78 "listeners": [ 94 "listeners": [
79 { 95 {
@@ -104,6 +120,8 @@
104 <article data-montage-id="panel_4"></article> 120 <article data-montage-id="panel_4"></article>
105 <article data-montage-id="panel_5"></article> 121 <article data-montage-id="panel_5"></article>
106 <article data-montage-id="panel_6"></article> 122 <article data-montage-id="panel_6"></article>
123 <article data-montage-id="panel_7"></article>
124 <article data-montage-id="panel_8"></article>
107 </article> 125 </article>
108 </section> 126 </section>
109</body> 127</body>
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js
index 8d1d6a5e..044fd598 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer.reel/PanelContainer.js
@@ -21,6 +21,18 @@ exports.PanelContainer = Montage.create(Component, {
21 value: [] 21 value: []
22 }, 22 },
23 23
24 panelsAvailable: {
25 value: function() {
26 var pAvail = [];
27 this.panels.forEach(function(obj) {
28 if (window.getComputedStyle(obj.element).display !== "none") {
29 pAvail.push(obj);
30 }
31 });
32 return pAvail;
33 }
34 },
35
24 currentPanelState: { 36 currentPanelState: {
25 value: {} 37 value: {}
26 }, 38 },
@@ -49,6 +61,8 @@ exports.PanelContainer = Montage.create(Component, {
49 this['panel_'+i].modulePath = p.modulePath; 61 this['panel_'+i].modulePath = p.modulePath;
50 this['panel_'+i].moduleName = p.moduleName; 62 this['panel_'+i].moduleName = p.moduleName;
51 this['panel_'+i].disabled = true; 63 this['panel_'+i].disabled = true;
64 this['panel_'+i].groups = p.groups;
65
52 66
53 this.currentPanelState[p.name] = {}; 67 this.currentPanelState[p.name] = {};
54 this.currentPanelState.version = "1.0";