(target: HTMLElement, sourceRect: DOMRect)
| 101 | * @param sourceRect Dimensions of the source element. |
| 102 | */ |
| 103 | export function matchElementSize(target: HTMLElement, sourceRect: DOMRect): void { |
| 104 | target.style.width = `${sourceRect.width}px`; |
| 105 | target.style.height = `${sourceRect.height}px`; |
| 106 | target.style.transform = getTransform(sourceRect.left, sourceRect.top); |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Gets a 3d `transform` that can be applied to an element. |
no test coverage detected