pull/10798/head
Rich Harris 2 years ago
parent 3f3c7b09e5
commit adfd6f0164

@ -97,11 +97,17 @@ export function animation(element, get_fn, get_params) {
animation?.abort();
// TODO bail if `from` and `to` match
if (
from.left !== to.left ||
from.right !== to.right ||
from.top !== to.top ||
from.bottom !== to.bottom
) {
animation = animate(this.element, options, undefined, 1, () => {
animation = undefined;
});
}
}
};
// in the case of a `<svelte:element>`, it's possible for `$.animation(...)` to be called

Loading…
Cancel
Save