aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/properties.reel/properties.js26
1 files changed, 21 insertions, 5 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index d05fb058..934a3851 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -28,15 +28,17 @@ exports.Properties = Montage.create(Component, {
28 28
29 this._currentDocument = value; 29 this._currentDocument = value;
30 30
31 if(!value) { 31// if(!value) {
32 this.clear(); 32 this.clear();
33 } else if(this._currentDocument.currentView === "design") { 33// }
34 // Save a reference of the pi inside the document view to be able to clear
35 this._currentDocument.model.views.design.propertiesPanel = this;
36 34
35 /*
36 else if(this._currentDocument.currentView === "design") {
37 // Display the default document root PI 37 // Display the default document root PI
38 this.displayElementProperties(this._currentDocument.model.documentRoot); 38 //this.displayElementProperties(this._currentDocument.model.documentRoot);
39// this.displaySelection(this._currentDocument.model.selection);
39 } 40 }
41 */
40 } 42 }
41 }, 43 },
42 44
@@ -181,6 +183,20 @@ exports.Properties = Montage.create(Component, {
181 } 183 }
182 }, 184 },
183 185
186 displaySelection: {
187 value: function(selection) {
188 if(selection.length === 0) {
189 this.displayElementProperties(this._currentDocument.model.documentRoot);
190 } else {
191 if(selection.length === 1) {
192 this.displayElementProperties(this.application.ninja.selectedElements[0]);
193 } else {
194 this.displayGroupProperties(this.application.ninja.selectedElements);
195 }
196 }
197 }
198 },
199
184 clear: { 200 clear: {
185 value: function() { 201 value: function() {
186 this.elementName.value = ""; 202 this.elementName.value = "";