popmotion-pose
Version:
A declarative animation library for HTML and SVG
12 lines (9 loc) • 383 B
text/typescript
export const measureWithoutTransform = (element: HTMLElement) => {
const transform = element.style.transform;
element.style.transform = '';
const bbox = element.getBoundingClientRect();
element.style.transform = transform;
return bbox;
};
export const resolveProp = (target: any, props: { [key: string]: any }) =>
typeof target === 'function' ? target(props) : target;