diff --git a/package.json b/package.json index c131c93d3a..f8dfdf4598 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-beta.25", + "version": "3.0.0-beta.26", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index", diff --git a/transition.mjs b/transition.mjs index 5bbefcf8e0..c89952cef5 100644 --- a/transition.mjs +++ b/transition.mjs @@ -122,8 +122,8 @@ export function draw(node, { } export function crossfade({ fallback, ...defaults }) { - let to_receive = new Map(); - let to_send = new Map(); + const to_receive = new Map(); + const to_send = new Map(); function crossfade(from, node, params) { const { @@ -138,13 +138,14 @@ export function crossfade({ fallback, ...defaults }) { const style = getComputedStyle(node); const transform = style.transform === 'none' ? '' : style.transform; + const opacity = +opacity; return { delay, duration: is_function(duration) ? duration(d) : duration, easing, css: (t, u) => ` - opacity: ${t}; + opacity: ${t * opacity}; transform: ${transform} translate(${u * dx}px,${u * dy}px); ` };