From d6f48218eb28804d4afbbf8b3e893aec8c19e520 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Thu, 17 May 2012 16:00:41 -0700 Subject: CSS Panel - Clear styles section on document close --- .../css-panel/styles-view-container.reel/styles-view-container.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/panels') diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js index e6e836ad..e63e3c74 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js @@ -67,6 +67,7 @@ exports.StylesViewContainer = Montage.create(Component, { this.eventManager.addEventListener('styleSheetsReady', this, false); //this.eventManager.addEventListener('elementChanging', this, false); this.eventManager.addEventListener('elementChange', this, false); + this.eventManager.addEventListener("closeDocument", this, false); } }, handleStyleSheetsReady: { @@ -150,6 +151,12 @@ exports.StylesViewContainer = Montage.create(Component, { } }, + handleCloseDocument: { + value: function(e) { + this.hasStyles = false; + this.needsDraw = true; + } + }, draw : { value: function() { -- cgit v1.2.3