diff options
author | Valerio Virgillito | 2012-06-01 16:19:04 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-01 16:19:04 -0700 |
commit | 75fc82ce49d6f1eb05dc950b46292d42b5856005 (patch) | |
tree | 8e8fd7a8f7e0eeb5b3b07322a45f1a9e070d9c3e /js | |
parent | 8433fa5ed0d4cc91e10b7080aa8edb8d94ccc1a4 (diff) | |
download | ninja-75fc82ce49d6f1eb05dc950b46292d42b5856005.tar.gz |
fixing some selection container changes and the breadcrumb not drawing initially
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/selection-controller.js | 2 | ||||
-rwxr-xr-x | js/document/models/base.js | 11 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 2 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 1 |
4 files changed, 13 insertions, 3 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index 28c0f3d3..4bca0755 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -34,7 +34,7 @@ exports.SelectionController = Montage.create(Component, { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | if(this._currentDocument && this._currentDocument.currentView === "design") { | 36 | if(this._currentDocument && this._currentDocument.currentView === "design") { |
37 | this._currentDocument.model.selection = this.application.ninja.selectedElements; | 37 | this._currentDocument.model._selection = this.application.ninja.selectedElements; |
38 | this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; | 38 | this._currentDocument.model.selectionContainer = this.application.ninja._currentSelectedContainer; |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/js/document/models/base.js b/js/document/models/base.js index 886a4ef0..76a5e62b 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -62,9 +62,18 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
62 | }, | 62 | }, |
63 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |
64 | // | 64 | // |
65 | selection: { | 65 | _selection: { |
66 | value: [] | 66 | value: [] |
67 | }, | 67 | }, |
68 | |||
69 | selection: { | ||
70 | get: function() { | ||
71 | return this._selection; | ||
72 | }, | ||
73 | set: function(value) { | ||
74 | this._selection = value; | ||
75 | } | ||
76 | }, | ||
68 | //////////////////////////////////////////////////////////////////// | 77 | //////////////////////////////////////////////////////////////////// |
69 | // | 78 | // |
70 | fileTemplate: { | 79 | fileTemplate: { |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 33c3080f..a98fca60 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 | "container": {"<-": "@owner.currentSelectedContainer"}, |
250 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} | 250 | "currentDocument": {"<-": "@documentList.selectedObjects.0"} |
251 | } | 251 | } |
252 | }, | 252 | }, |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index ac883923..a12270a0 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -292,6 +292,7 @@ exports.Ninja = Montage.create(Component, { | |||
292 | 292 | ||
293 | if(doc.currentView === "design") { | 293 | if(doc.currentView === "design") { |
294 | // TODO: Bind directly to the model of the document in components instead of this property | 294 | // TODO: Bind directly to the model of the document in components instead of this property |
295 | this._currentSelectedContainer = null; | ||
295 | this.currentSelectedContainer = doc.model.documentRoot; | 296 | this.currentSelectedContainer = doc.model.documentRoot; |
296 | } | 297 | } |
297 | } | 298 | } |