From 4f8ed16a4888f5471c9eb03c0d5d0a9c35ce3ee8 Mon Sep 17 00:00:00 2001 From: Matt Perry Date: Mon, 13 May 2024 16:17:41 +0200 Subject: [PATCH] Allowing interpolation of hidden --- .../src/animation/animators/utils/can-animate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/framer-motion/src/animation/animators/utils/can-animate.ts b/packages/framer-motion/src/animation/animators/utils/can-animate.ts index 1bfaf59b8f..c9de4cbcd5 100644 --- a/packages/framer-motion/src/animation/animators/utils/can-animate.ts +++ b/packages/framer-motion/src/animation/animators/utils/can-animate.ts @@ -24,7 +24,11 @@ export function canAnimate( const originKeyframe = keyframes[0] if (originKeyframe === null) return false - console.log(keyframes, name) + /** + * These aren't traditionally animatable but we do support them. + * In future we could look into making this more generic or replacing + * this function with mix() === mixImmediate + */ if (name === "display" || name === "visibility") return true const targetKeyframe = keyframes[keyframes.length - 1]