Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Mar 12, 2024
1 parent 8e72328 commit 1175f07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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<string | number>,
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) {
Expand Down
1 change: 0 additions & 1 deletion packages/framer-motion/src/render/svg/SVGVisualElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion packages/framer-motion/src/render/utils/animation-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
{}
Expand Down

0 comments on commit 1175f07

Please sign in to comment.