aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-09 21:21:29 -0800
committerValerio Virgillito2012-02-09 21:21:29 -0800
commit26bfb7a4cbf66c35e23eec46def045bd295be2e1 (patch)
tree31484876c697b8eeef56dd83934651fae91c17f5 /js/panels
parent67a5b6a1fb352bdc69ff05297268c27e7e2ba795 (diff)
downloadninja-26bfb7a4cbf66c35e23eec46def045bd295be2e1.tar.gz
disabling the auto open of a document on load. Temporary using the new project button to open a document.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/properties/content.reel/content.js9
-rwxr-xr-xjs/panels/properties/sections/three-d-view.reel/three-d-view.js35
2 files changed, 28 insertions, 16 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index 0088447a..51b776f1 100755
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -54,8 +54,17 @@ exports.Content = Montage.create(Component, {
54 this.eventManager.addEventListener( "elementChanging", this, false); 54 this.eventManager.addEventListener( "elementChanging", this, false);
55 } 55 }
56 56
57 this.eventManager.addEventListener("openDocument", this, false);
58 }
59 },
60
61 // Document is opened - Display the current selection
62 handleOpenDocument: {
63 value: function() {
64
57 this.eventManager.addEventListener( "elementChange", this, false); 65 this.eventManager.addEventListener( "elementChange", this, false);
58 66
67 // For now always assume that the stage is selected by default
59 if(this.application.ninja.selectedElements.length === 0) { 68 if(this.application.ninja.selectedElements.length === 0) {
60 this.displayStageProperties(); 69 this.displayStageProperties();
61 } 70 }
diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.js b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
index 0c4a9171..35591afa 100755
--- a/js/panels/properties/sections/three-d-view.reel/three-d-view.js
+++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
@@ -207,29 +207,32 @@ exports.ThreeD = Montage.create(Component, {
207 templateDidLoad : { 207 templateDidLoad : {
208 value: function() { 208 value: function() {
209 Object.defineBinding(this, "axisMode", { 209 Object.defineBinding(this, "axisMode", {
210 boundObject: this.axisModeGroupControl, 210 boundObject: this.axisModeGroupControl,
211 boundObjectPropertyPath: "selectedIndex", 211 boundObjectPropertyPath: "selectedIndex",
212 oneway: false 212 oneway: false
213 }); 213 });
214
215 this.eventManager.addEventListener("openDocument", this, false);
216 }
217 },
218
219 handleOpenDocument: {
220 value: function() {
214 221
215 Object.defineBinding(this, "item", { 222 Object.defineBinding(this, "item", {
216 boundObject: this, 223 boundObject: this,
217 boundObjectPropertyPath: "application.ninja.selectedElements", 224 boundObjectPropertyPath: "application.ninja.selectedElements",
218 boundValueMutator: this._getSelectedItem, 225 boundValueMutator: this._getSelectedItem,
219 oneway: true 226 oneway: true
220 }); 227 });
221 } 228 }
222 }, 229 },
223 230
224 _getSelectedItem: { 231 _getSelectedItem: {
225 value: function(els) 232 value: function(els) {
226 { 233 if(els.length) {
227 if(els.length)
228 {
229 return els[0]._element || els[0]; 234 return els[0]._element || els[0];
230 } 235 } else {
231 else
232 {
233 return this.boundObject.application.ninja.currentDocument.documentRoot; 236 return this.boundObject.application.ninja.currentDocument.documentRoot;
234 } 237 }
235 } 238 }