diff options
Diffstat (limited to 'js/panels/properties')
-rwxr-xr-x | js/panels/properties/content.reel/content.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 8fa33a75..fcd85675 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js | |||
@@ -55,6 +55,8 @@ exports.Content = Montage.create(Component, { | |||
55 | } | 55 | } |
56 | 56 | ||
57 | this.eventManager.addEventListener("openDocument", this, false); | 57 | this.eventManager.addEventListener("openDocument", this, false); |
58 | |||
59 | this.eventManager.addEventListener("switchDocument", this, false); | ||
58 | } | 60 | } |
59 | }, | 61 | }, |
60 | 62 | ||
@@ -74,6 +76,21 @@ exports.Content = Montage.create(Component, { | |||
74 | } | 76 | } |
75 | }, | 77 | }, |
76 | 78 | ||
79 | handleSwitchDocument: { | ||
80 | value: function(){ | ||
81 | // For now always assume that the stage is selected by default | ||
82 | if(this.application.ninja.selectedElements.length === 0) { | ||
83 | this.displayStageProperties(); | ||
84 | }else{ | ||
85 | if(this.application.ninja.selectedElements.length === 1) { | ||
86 | this.displayElementProperties(this.application.ninja.selectedElements[0]._element); | ||
87 | } else { | ||
88 | this.displayGroupProperties(this.application.ninja.selectedElements); | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | }, | ||
93 | |||
77 | /** | 94 | /** |
78 | * Blur and Key up to handle change in the Element ID field. | 95 | * Blur and Key up to handle change in the Element ID field. |
79 | */ | 96 | */ |