earthtoday-react-motion
Version:
A spring that solves your animation problems.
14 lines (12 loc) • 344 B
Flow
/* @flow */
import type { PlainStyle, Style } from './Types';
// currently used to initiate the velocity style object to 0
export default function mapToZero(obj: Style | PlainStyle): PlainStyle {
let ret = {};
for (const key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
ret[key] = 0;
}
}
return ret;
}