From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 3 +-- js/ninja.reel/ninja.js | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'js/ninja.reel') 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 @@ "element":{"#" : "breadCrumbComponent"} }, "bindings" : { - "container": {"<-": "@owner.currentSelectedContainer"}, + "currentDocument": {"<-": "@documentList.selectedObjects.0"} } }, @@ -291,7 +291,6 @@ "selectionController": { "prototype": "js/controllers/selection-controller", "bindings" : { - "selectionContainer": {"<-": "@owner.currentSelectedContainer"}, "currentDocument": {"<-": "@documentList.selectedObjects.0"}, "selectedElements": {"<-": "@documentList.selectedObjects.0.model.selection"} } 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, { value: [] }, - _currentSelectedContainer: { - value: null - }, - - currentSelectedContainer: { - get: function() { - return this._currentSelectedContainer; - }, - set: function(value) { - if(value !== this._currentSelectedContainer) { - this._currentSelectedContainer = value; - } - } - }, - templateDidLoad: { value: function() { this.ninjaVersion = window.ninjaVersion.ninja.version; @@ -321,11 +306,6 @@ exports.Ninja = Montage.create(Component, { // TODO: Remove this when integrating the next montage this.documentList.selectedObjects = [doc]; - if(doc.currentView === "design") { - // TODO: Bind directly to the model of the document in components instead of this property - this._currentSelectedContainer = null; - this.currentSelectedContainer = doc.model.documentRoot; - } } }, -- cgit v1.2.3