All files / src/motion/utils is-forced-motion-value.ts

100% Statements 6/6
66.67% Branches 4/6
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1937x   37x         37x   361x   361x              
import { scaleCorrectors } from "../../projection/styles/scale-correction"
import { MotionProps } from "../.."
import {
    isTransformOriginProp,
    isTransformProp,
} from "../../render/html/utils/transform"
 
export function isForcedMotionValue(
    key: string,
    { layout, layoutId }: MotionProps
) {
    return (
        isTransformProp(key) ||
        isTransformOriginProp(key) ||
        ((layout || layoutId !== undefined) &&
            (!!scaleCorrectors[key] || key === "opacity"))
    )
}