From b4dd3e269b9de188e015f4cfac29c70a684f4c4f Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 6 Feb 2012 18:25:15 -0800 Subject: Fix problem with resizer set to capture all webkitTransitionEnd events. Update collapser to use namespaced webkitTransitionEnd events for forward compatibility. Signed-off-by: Jonathan Duran --- js/panels/Resizer.js | 4 ++-- js/panels/Timeline/Collapser.js | 5 +++-- js/panels/Timeline/Style.reel/Style.html | 2 +- js/panels/Timeline/Style.reel/Style.js | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/panels/Resizer.js b/js/panels/Resizer.js index 69efd6ac..3afe5d5b 100644 --- a/js/panels/Resizer.js +++ b/js/panels/Resizer.js @@ -92,7 +92,7 @@ exports.Resizer = Montage.create(Component, { handleDblclick: { value : function() { - this.panel.addEventListener("webkitTransitionEnd", this, true); + this.panel.addEventListener("webkitTransitionEnd", this, false); if (this.isVertical) { this.panel.style.height = ""; } else { @@ -102,7 +102,7 @@ exports.Resizer = Montage.create(Component, { } }, - captureWebkitTransitionEnd: { + handleWebkitTransitionEnd: { value: function() { if(this.redrawStage) { this.application.ninja.stage.resizeCanvases = true; diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index 2fbe8e83..d286d84c 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js @@ -206,6 +206,7 @@ var Montage = require("montage/core/core").Montage, // Add a handler for the end of the transition, so we can tidy things up after // the transition completes + this.myContent.identifier = "myContent"; this.myContent.addEventListener("webkitTransitionEnd", this, false); this.myContent.style.overflow = "hidden"; @@ -236,7 +237,7 @@ var Montage = require("montage/core/core").Montage, // Special cases: If transition does not happen (in the case of a contentHeight of 0 // or isAnimated = false) we need to manually fire it here to do the cleanup. if ((this.contentHeight < 3) || (!this.isAnimated)) { - this.handleWebkitTransitionEnd(); + this.handleMyContentWebkitTransitionEnd(); } } } @@ -284,7 +285,7 @@ var Montage = require("montage/core/core").Montage, // This handler is bound to the transitionEnd event. If transitions // are disabled, it is called manually. - handleWebkitTransitionEnd: { + handleMyContentWebkitTransitionEnd: { value: function(event) { // Are we animating the transitions? diff --git a/js/panels/Timeline/Style.reel/Style.html b/js/panels/Timeline/Style.reel/Style.html index f10ad842..c6f29626 100644 --- a/js/panels/Timeline/Style.reel/Style.html +++ b/js/panels/Timeline/Style.reel/Style.html @@ -33,7 +33,7 @@ } }, "hottextunit" : { - "module" : "montage/ui/hottextunit.reel", + "module" : "js/components/hottextunit.reel", "name" : "HotTextUnit", "properties" : { "element" : {"#":"value-editor-hottext"} diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index 13a5db3e..796385d0 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js @@ -521,7 +521,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { "property" : "text-indent", "tweener" : "hottext", "units" : "px", - "min" : 0, + "min" : -9999, "max" : 9999, "default" : 0 }, -- cgit v1.2.3