From aabb48a1c8d34bc968f4c6b0ffee4e31c1d5d286 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 2 Mar 2012 11:22:44 -0800 Subject: Presets Panel - Fix single-click activation, and transition cut-off bug. Use double-click as the activation event for transition presets. Also fixed the bug when applying a style preset before the transition preset, which disabled transitions after the first one. --- js/panels/presets/style-presets.reel/style-presets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/panels/presets/style-presets.reel') diff --git a/js/panels/presets/style-presets.reel/style-presets.js b/js/panels/presets/style-presets.reel/style-presets.js index 7871683e..11f41822 100644 --- a/js/panels/presets/style-presets.reel/style-presets.js +++ b/js/panels/presets/style-presets.reel/style-presets.js @@ -47,9 +47,11 @@ exports.StylesLibrary = Montage.create(Component, { selection.forEach(function(el) { el._element.style.webkitTransition = "all 450ms linear"; - el._element.addEventListener("webkitTransitionEnd", function(e) { + el._element.addEventListener("webkitTransitionEnd", function presetTransition(e) { el._element.style.webkitTransition = ''; setStopRuleSelector("*"); + this.removeEventListener("webkitTransitionEnd", presetTransition, true); + }, true); setStopRuleSelector("transitionStopRule"); el._element.classList.add(selectorBase); -- cgit v1.2.3