improve conditional animations
This commit is contained in:
parent
9d1d91711e
commit
fc8d81753e
1 changed files with 18 additions and 0 deletions
|
@ -13,9 +13,27 @@ export function maybeModalFly(node) {
|
||||||
export function maybeFly(...e) {
|
export function maybeFly(...e) {
|
||||||
if (getItem("ui:doAnimations"))
|
if (getItem("ui:doAnimations"))
|
||||||
return fly(...e);
|
return fly(...e);
|
||||||
|
else
|
||||||
|
return fly(e[0], { duration: 0 });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function maybeFade(...e) {
|
export function maybeFade(...e) {
|
||||||
if (getItem("ui:doAnimations"))
|
if (getItem("ui:doAnimations"))
|
||||||
return fade(...e);
|
return fade(...e);
|
||||||
|
else
|
||||||
|
return fade(e[0], { duration: 0 });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function maybeFlyIf(...e) {
|
||||||
|
if (getItem("ui:doAnimations") && e[1] && e[1]._condition)
|
||||||
|
return fly(...e);
|
||||||
|
else
|
||||||
|
return fly(e[0], { duration: 0 });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function maybeFadeIf(...e) {
|
||||||
|
if (getItem("ui:doAnimations") && e[1] && e[1]._condition)
|
||||||
|
return fade(...e);
|
||||||
|
else
|
||||||
|
return fade(e[0], { duration: 0 });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue