diff --git a/packages/framer-motion/src/render/html/utils/make-none-animatable.ts b/packages/framer-motion/src/render/html/utils/make-none-animatable.ts index 7398bba959..d730c066d7 100644 --- a/packages/framer-motion/src/render/html/utils/make-none-animatable.ts +++ b/packages/framer-motion/src/render/html/utils/make-none-animatable.ts @@ -1,14 +1,17 @@ import { getAnimatableNone } from "../../dom/value-types/animatable-none" import { UnresolvedKeyframes } from "../../utils/KeyframesResolver" +/** + * If we encounter keyframes like "none" or "0" and we also have keyframes like + * "#fff" or "200px 200px" we want to find a keyframe to serve as a template for + * the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into + * zero equivalents, i.e. "#fff0" or "0px 0px". + */ export function makeNoneKeyframesAnimatable( unresolvedKeyframes: UnresolvedKeyframes, noneKeyframeIndexes: number[], name?: string ) { - /** - * If we detected "none"-equivalent keyframes, we need to find a template - */ let i = 0 let animatableTemplate: string | undefined = undefined while (i < unresolvedKeyframes.length && !animatableTemplate) { diff --git a/packages/framer-motion/src/render/svg/SVGVisualElement.ts b/packages/framer-motion/src/render/svg/SVGVisualElement.ts index 5f02c8beeb..3fafc58faf 100644 --- a/packages/framer-motion/src/render/svg/SVGVisualElement.ts +++ b/packages/framer-motion/src/render/svg/SVGVisualElement.ts @@ -33,7 +33,6 @@ export class SVGVisualElement extends DOMVisualElement< } readValueFromInstance(instance: SVGElement, key: string) { - // console.log("reading", key, "from", instance) if (transformProps.has(key)) { const defaultType = getDefaultValueType(key) return defaultType ? defaultType.default || 0 : 0 diff --git a/packages/framer-motion/src/render/utils/animation-state.ts b/packages/framer-motion/src/render/utils/animation-state.ts index bf219f0956..43cc531204 100644 --- a/packages/framer-motion/src/render/utils/animation-state.ts +++ b/packages/framer-motion/src/render/utils/animation-state.ts @@ -214,7 +214,6 @@ export function createAnimationState( * Build an object of all the resolved values. We'll use this in the subsequent * animateChanges calls to determine whether a value has changed. */ - // TODO Resolve with options let resolvedValues = definitionList.reduce( buildResolvedTypeValues(type), {}