diff options
author | Valerio Virgillito | 2012-02-28 16:02:37 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-28 16:02:37 -0800 |
commit | 20d4f1d703c004dd7f869576b6c471b3fb5b5d3e (patch) | |
tree | 7a6cf1e52e1aea55f4bc2112e11a790fc35f839c /js/panels/properties/content.reel | |
parent | ee52f197d1eb53a5ff30b54b8df1d2b53014eb0e (diff) | |
parent | 557c4d3100ccde51b925b71f0650b2c783a4a042 (diff) | |
download | ninja-20d4f1d703c004dd7f869576b6c471b3fb5b5d3e.tar.gz |
Merge pull request #81 from ananyasen/integration-candidate
persist selections while switching documents
Diffstat (limited to 'js/panels/properties/content.reel')
-rwxr-xr-x | js/panels/properties/content.reel/content.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index 8fa33a75..cc9ec96a 100755 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js | |||
@@ -55,6 +55,7 @@ exports.Content = Montage.create(Component, { | |||
55 | } | 55 | } |
56 | 56 | ||
57 | this.eventManager.addEventListener("openDocument", this, false); | 57 | this.eventManager.addEventListener("openDocument", this, false); |
58 | this.eventManager.addEventListener("switchDocument", this, false); | ||
58 | } | 59 | } |
59 | }, | 60 | }, |
60 | 61 | ||
@@ -74,6 +75,21 @@ exports.Content = Montage.create(Component, { | |||
74 | } | 75 | } |
75 | }, | 76 | }, |
76 | 77 | ||
78 | handleSwitchDocument: { | ||
79 | value: function(){ | ||
80 | // For now always assume that the stage is selected by default | ||
81 | if(this.application.ninja.selectedElements.length === 0) { | ||
82 | this.displayStageProperties(); | ||
83 | }else { | ||
84 | if(this.application.ninja.selectedElements.length === 1) { | ||
85 | this.displayElementProperties(this.application.ninja.selectedElements[0]._element); | ||
86 | } else { | ||
87 | this.displayGroupProperties(this.application.ninja.selectedElements); | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | }, | ||
92 | |||
77 | /** | 93 | /** |
78 | * Blur and Key up to handle change in the Element ID field. | 94 | * Blur and Key up to handle change in the Element ID field. |
79 | */ | 95 | */ |