MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / from

Function from

core/src/utils/animation/animation.ts:917–927  ·  view source on GitHub ↗
(property: string, value: string | number)

Source from the content-addressed store, hash-verified

915 };
916
917 const from = (property: string, value: string | number) => {
918 const firstFrame = _keyframes[0] as AnimationKeyFrameEdge | undefined;
919
920 if (firstFrame !== undefined && (firstFrame.offset === undefined || firstFrame.offset === 0)) {
921 firstFrame[property] = value;
922 } else {
923 _keyframes = [{ offset: 0, [property]: value }, ..._keyframes] as AnimationKeyFrame[];
924 }
925
926 return ani;
927 };
928
929 const to = (property: string, value: string | number) => {
930 const lastFrame = _keyframes[_keyframes.length - 1] as AnimationKeyFrameEdge | undefined;

Callers 1

fromToFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected