diff --git a/package.json b/package.json index f8dfdf4598..29c5bec2e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte", - "version": "3.0.0-beta.26", + "version": "3.0.0-beta.27", "description": "The magical disappearing UI framework", "module": "index.mjs", "main": "index", diff --git a/transition.mjs b/transition.mjs index c89952cef5..857fd03165 100644 --- a/transition.mjs +++ b/transition.mjs @@ -135,10 +135,11 @@ export function crossfade({ fallback, ...defaults }) { const to = node.getBoundingClientRect(); const dx = from.left - to.left; const dy = from.top - to.top; + const d = Math.sqrt(dx * dx + dy * dy); const style = getComputedStyle(node); const transform = style.transform === 'none' ? '' : style.transform; - const opacity = +opacity; + const opacity = +style.opacity; return { delay,