aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-xjs/panels/properties.reel/properties.js26
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js2
2 files changed, 22 insertions, 6 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 = "";
diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js
index 49907c9d..104d474d 100755
--- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js
+++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js
@@ -213,7 +213,7 @@ exports.ThreeD = Montage.create(Component, {
213 213
214 this._currentDocument = value; 214 this._currentDocument = value;
215 215
216 if(this._currentDocument.currentView === "design") { 216 if(this._currentDocument && this._currentDocument.currentView === "design") {
217 // Save a reference of the pi inside the document view to be able to clear 217 // Save a reference of the pi inside the document view to be able to clear
218 Object.defineBinding(this, "item", { 218 Object.defineBinding(this, "item", {
219 boundObject: this, 219 boundObject: this,