BottomSheet: fix hero animation position

This commit is contained in:
thislight 2024-10-09 23:34:07 +08:00
parent 53eefed656
commit d61212242e

View file

@ -185,8 +185,8 @@ const BottomSheet: ParentComponent<BottomSheetProps> = (props) => {
const duration = (distance / MOVE_SPEED) * 1000;
animation = element.animate(
[
composeAnimationFrame(startRect, { opacity: reserve ? 1 : 0.5 }),
composeAnimationFrame(endRect, { opacity: reserve ? 0.5 : 1 }),
composeAnimationFrame(startRect, { opacity: reserve ? 1 : 0.5, transform: "none" }),
composeAnimationFrame(endRect, { opacity: reserve ? 0.5 : 1, transform: "none" }),
],
{ easing, duration },
);