From bcfb704b04587f95a13c474cf0598ba90ec3b371 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 6 Mar 2012 18:06:40 -0800 Subject: Timeline: Code cleanup. Fix bug with unfound property in serialization. --- js/panels/Timeline/Collapser.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'js/panels/Timeline/Collapser.js') diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index 32733b0a..88314c8b 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js @@ -179,24 +179,14 @@ var Montage = require("montage/core/core").Montage, prepareForDraw: { value: function() { - // Add a click listener to the label for expand/collapse - /* - if (this.isLabelClickable) { - this.clicker.identifier = "collapserLabel"; - this.clicker.addEventListener("click", this, false); - } - */ + // Get the original value of the overflow property: this._origOverflowValue = window.getComputedStyle(this.myContent, null).getPropertyValue("overflow"); - console.log("collapser: this.isCollapsed " + this.isCollapsed) if (this.isCollapsed === false) { this.myContent.style.height = "auto"; } - /* - * Removed because of expense. This disables the feature of having the - * component dynamically expand/collapse the content on init based on properties; - * Now default state of component must be set in CSS. + // If the content area is supposed to start out collapsed: if (this.isCollapsed) { this.myContent.style.height = "0px"; @@ -211,7 +201,6 @@ var Montage = require("montage/core/core").Montage, this.myContent.classList.remove(this.collapsedClass); this.clicker.classList.remove(this.collapsedClass); } - */ } }, draw: { -- cgit v1.2.3