aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-11 17:03:16 -0700
committerValerio Virgillito2012-06-11 17:03:16 -0700
commit6854a72504f57903bd5de003e377f2aefb02d0da (patch)
tree5dff803d67722595418e69f6cce9ec8a1a616f2f /js/ninja.reel
parent756cbfad2b98b300af8db3793aa21718b88dd950 (diff)
parentf4ad120c1a0d8594b8741eb1b07fdbd4fefcadeb (diff)
downloadninja-6854a72504f57903bd5de003e377f2aefb02d0da.tar.gz
Merge pull request #288 from mencio/dom-container
Dom container - Fixing the current selected container
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-xjs/ninja.reel/ninja.html3
-rwxr-xr-xjs/ninja.reel/ninja.js20
2 files changed, 1 insertions, 22 deletions
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index a98fca60..38b956bd 100755
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -246,7 +246,7 @@
246 "element":{"#" : "breadCrumbComponent"} 246 "element":{"#" : "breadCrumbComponent"}
247 }, 247 },
248 "bindings" : { 248 "bindings" : {
249 "container": {"<-": "@owner.currentSelectedContainer"}, 249
250 "currentDocument": {"<-": "@documentList.selectedObjects.0"} 250 "currentDocument": {"<-": "@documentList.selectedObjects.0"}
251 } 251 }
252 }, 252 },
@@ -291,7 +291,6 @@
291 "selectionController": { 291 "selectionController": {
292 "prototype": "js/controllers/selection-controller", 292 "prototype": "js/controllers/selection-controller",
293 "bindings" : { 293 "bindings" : {
294 "selectionContainer": {"<-": "@owner.currentSelectedContainer"},
295 "currentDocument": {"<-": "@documentList.selectedObjects.0"}, 294 "currentDocument": {"<-": "@documentList.selectedObjects.0"},
296 "selectedElements": {"<-": "@documentList.selectedObjects.0.model.selection"} 295 "selectedElements": {"<-": "@documentList.selectedObjects.0.model.selection"}
297 } 296 }
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 38f5efcf..b57aecd2 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -147,21 +147,6 @@ exports.Ninja = Montage.create(Component, {
147 value: [] 147 value: []
148 }, 148 },
149 149
150 _currentSelectedContainer: {
151 value: null
152 },
153
154 currentSelectedContainer: {
155 get: function() {
156 return this._currentSelectedContainer;
157 },
158 set: function(value) {
159 if(value !== this._currentSelectedContainer) {
160 this._currentSelectedContainer = value;
161 }
162 }
163 },
164
165 templateDidLoad: { 150 templateDidLoad: {
166 value: function() { 151 value: function() {
167 this.ninjaVersion = window.ninjaVersion.ninja.version; 152 this.ninjaVersion = window.ninjaVersion.ninja.version;
@@ -321,11 +306,6 @@ exports.Ninja = Montage.create(Component, {
321 // TODO: Remove this when integrating the next montage 306 // TODO: Remove this when integrating the next montage
322 this.documentList.selectedObjects = [doc]; 307 this.documentList.selectedObjects = [doc];
323 308
324 if(doc.currentView === "design") {
325 // TODO: Bind directly to the model of the document in components instead of this property
326 this._currentSelectedContainer = null;
327 this.currentSelectedContainer = doc.model.documentRoot;
328 }
329 } 309 }
330 }, 310 },
331 311