From 31b094ee21102f99a4021d505bc3a28527c9e23d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 30 May 2012 01:33:20 -0700 Subject: Fixing the close document. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'js/panels/properties.reel/properties.js') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index e99f58e9..4b663220 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -29,7 +29,9 @@ exports.Properties = Montage.create(Component, { this._currentDocument = value; - if(this._currentDocument.currentView === "design") { + if(!value) { + this.clear(); + } else if(this._currentDocument.currentView === "design") { // Save a reference of the pi inside the document view to be able to clear this._currentDocument.model.views.design.propertiesPanel = this; @@ -74,7 +76,6 @@ exports.Properties = Montage.create(Component, { value : function() { this.eventManager.addEventListener("elementChange", this, false); this.eventManager.addEventListener("selectionChange", this, false); - this.eventManager.addEventListener("closeDocument", this, false); // This will be a toggle option if(this.application.ninja.appData.PILiveUpdate) { @@ -91,12 +92,6 @@ exports.Properties = Montage.create(Component, { } }, - handleCloseDocument: { - value: function(){ - this.clear(); - } - }, - /** * Blur and Key up to handle change in the Element ID field. */ -- cgit v1.2.3