aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/selection-controller.js10
-rw-r--r--js/data/panels-data.js25
-rwxr-xr-xjs/ninja.reel/ninja.html2
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js2
-rwxr-xr-xjs/panels/Panel.reel/Panel.js100
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html110
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js (renamed from js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js)75
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.html146
-rw-r--r--js/panels/drag-drop-composer.js2
9 files changed, 224 insertions, 248 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js
index 08eb018f..75968d4a 100755
--- a/js/controllers/selection-controller.js
+++ b/js/controllers/selection-controller.js
@@ -76,7 +76,7 @@ exports.SelectionController = Montage.create(Component, {
76 76
77 77
78 this.application.ninja.selectedElements = currentSelectionArray; 78 this.application.ninja.selectedElements = currentSelectionArray;
79 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); 79 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument});
80 80
81 81
82 82
@@ -92,12 +92,12 @@ exports.SelectionController = Montage.create(Component, {
92 handleSwitchDocument: { 92 handleSwitchDocument: {
93 value: function() { 93 value: function() {
94 this._selectedItems = this.application.ninja.selectedElements.slice(0); 94 this._selectedItems = this.application.ninja.selectedElements.slice(0);
95 if(this._selectedItems.length === 0 ){ 95 if(this._selectedItems.length === 0) {
96 this._isDocument = true; 96 this._isDocument = true;
97 }else{ 97 } else {
98 this._isDocument = false; 98 this._isDocument = false;
99 } 99 }
100 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); 100 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument});
101 101
102 this._selectionContainer = this.application.ninja.currentSelectedContainer; 102 this._selectionContainer = this.application.ninja.currentSelectedContainer;
103 } 103 }
@@ -139,7 +139,7 @@ exports.SelectionController = Montage.create(Component, {
139 value: function(event) { 139 value: function(event) {
140 this.application.ninja.selectedElements = []; 140 this.application.ninja.selectedElements = [];
141 this._isDocument = true; 141 this._isDocument = true;
142 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); 142 NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument});
143 } 143 }
144 }, 144 },
145 145
diff --git a/js/data/panels-data.js b/js/data/panels-data.js
index aa5057a2..2422f5e7 100644
--- a/js/data/panels-data.js
+++ b/js/data/panels-data.js
@@ -19,7 +19,6 @@ exports.PanelsData = Montage.create(Montage, {
19 scrollable: false, 19 scrollable: false,
20 collapsed: false, 20 collapsed: false,
21 open: true, 21 open: true,
22 contentComponent: null,
23 modulePath: "js/panels/Color/colorpanelbase.reel", 22 modulePath: "js/panels/Color/colorpanelbase.reel",
24 moduleName: "ColorPanelBase" 23 moduleName: "ColorPanelBase"
25 }, 24 },
@@ -32,7 +31,6 @@ exports.PanelsData = Montage.create(Montage, {
32 scrollable: true, 31 scrollable: true,
33 collapsed: false, 32 collapsed: false,
34 open: true, 33 open: true,
35 contentComponent: null,
36 modulePath: "js/panels/properties.reel", 34 modulePath: "js/panels/properties.reel",
37 moduleName: "Properties" 35 moduleName: "Properties"
38 }, 36 },
@@ -45,7 +43,6 @@ exports.PanelsData = Montage.create(Montage, {
45 collapsed: true, 43 collapsed: true,
46 scrollable: true, 44 scrollable: true,
47 open: true, 45 open: true,
48 contentComponent: null,
49 modulePath: "js/panels/Materials/materials-library-panel.reel", 46 modulePath: "js/panels/Materials/materials-library-panel.reel",
50 moduleName: "MaterialsLibraryPanel" 47 moduleName: "MaterialsLibraryPanel"
51 }, 48 },
@@ -58,7 +55,6 @@ exports.PanelsData = Montage.create(Montage, {
58 scrollable: true, 55 scrollable: true,
59 collapsed: true, 56 collapsed: true,
60 open: true, 57 open: true,
61 contentComponent: null,
62 modulePath: "js/panels/Components/ComponentsPanelBase.reel", 58 modulePath: "js/panels/Components/ComponentsPanelBase.reel",
63 moduleName: "ComponentsPanelBase" 59 moduleName: "ComponentsPanelBase"
64 }, 60 },
@@ -71,7 +67,6 @@ exports.PanelsData = Montage.create(Montage, {
71// scrollable: true, 67// scrollable: true,
72// collapsed: false, 68// collapsed: false,
73// open: true, 69// open: true,
74// content: null,
75// modulePath: "js/panels/Project/projectpanelbase.reel", 70// modulePath: "js/panels/Project/projectpanelbase.reel",
76// moduleName: "ProjectPanelBase" 71// moduleName: "ProjectPanelBase"
77// }, 72// },
@@ -84,7 +79,6 @@ exports.PanelsData = Montage.create(Montage, {
84 scrollable: true, 79 scrollable: true,
85 collapsed: true, 80 collapsed: true,
86 open: true, 81 open: true,
87 contentComponent: null,
88 modulePath: "js/panels/CSSPanel/CSSPanelBase.reel", 82 modulePath: "js/panels/CSSPanel/CSSPanelBase.reel",
89 moduleName: "CSSPanelBase" 83 moduleName: "CSSPanelBase"
90 }, 84 },
@@ -97,7 +91,6 @@ exports.PanelsData = Montage.create(Montage, {
97 collapsed: true, 91 collapsed: true,
98 scrollable: true, 92 scrollable: true,
99 open: true, 93 open: true,
100 contentComponent: null,
101 modulePath: "js/panels/presets/content.reel", 94 modulePath: "js/panels/presets/content.reel",
102 moduleName: "content" 95 moduleName: "content"
103 } 96 }
@@ -118,24 +111,6 @@ exports.PanelsData = Montage.create(Montage, {
118 this._panelOrder = val; 111 this._panelOrder = val;
119 } 112 }
120 } 113 }
121
122
123 panels: {
124 get: function() {
125 var filtered = this._panels.filter(function(item) {
126 return item.open;
127 });
128
129 filtered.sort(function(a,b) {
130 a.name
131 });
132
133 return filtered;
134 },
135 set : function() {
136
137 }
138 }
139 */ 114 */
140 115
141}); \ No newline at end of file 116}); \ No newline at end of file
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index cdf53ddf..8f6f6d7b 100755
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -166,7 +166,7 @@
166 }, 166 },
167 167
168 "panelContainer": { 168 "panelContainer": {
169 "module": "js/panels/PanelContainer/PanelContainer.reel", 169 "module": "js/panels/PanelContainer.reel",
170 "name": "PanelContainer", 170 "name": "PanelContainer",
171 "properties": { 171 "properties": {
172 "element": {"#": "rightPanelContent"}, 172 "element": {"#": "rightPanelContent"},
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index b4eec771..b6bee37d 100755
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -118,7 +118,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
118 didCreate: { 118 didCreate: {
119 value: function() { 119 value: function() {
120 // Setup the drop delegate 120 // Setup the drop delegate
121 this.application.ninja.dragDropMediator.dropDelegate = this; 121// this.application.ninja.dragDropMediator.dropDelegate = this;
122 // Loop through the component and load the JSON data for them 122 // Loop through the component and load the JSON data for them
123 this._loadComponents(); 123 this._loadComponents();
124 } 124 }
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js
index e0bf3f18..2b308258 100755
--- a/js/panels/Panel.reel/Panel.js
+++ b/js/panels/Panel.reel/Panel.js
@@ -9,31 +9,52 @@ var Component = require("montage/ui/component").Component;
9 9
10exports.Panel = Montage.create(Component, { 10exports.Panel = Montage.create(Component, {
11 11
12 name: { value: "Panel" }, 12 name: {
13 collapsedHeight: {value: 26}, 13 value: "Panel"
14 _collapsed: {value: false}, 14 },
15 _height: { value: 200 }, 15
16 minHeight: {value: 200 }, 16 _collapsed: {
17 maxHeight: { value: null}, 17 value: false
18 flexible: {value: true}, 18 },
19 _locked: { value: false}, 19
20 isResizing: {value: false }, 20 _height: {
21 resizer: {value: null }, 21 value: 200
22 modulePath: {value: null}, 22 },
23 moduleName: {value: null}, 23
24 _contentComponent: {value: null}, 24 minHeight: {
25 25 value: 200
26 contentComponent: { 26 },
27 get: function() { 27
28 return this._contentComponent; 28 maxHeight: {
29 }, 29 value: null
30 set: function(val) { 30 },
31 if (val !== null && val !== this._contentComponent) { 31
32 this.panelContent.content = val; 32 flexible: {
33 this.panelContent.needsDraw = true; 33 value: true
34 this._contentComponent = val; 34 },
35 } 35
36 } 36 _locked: {
37 value: false
38 },
39
40 isResizing: {
41 value: false
42 },
43
44 _resi