MCPcopy Create free account
hub / github.com/angular/components / matchElementSize

Function matchElementSize

src/cdk/drag-drop/dom/styling.ts:103–107  ·  view source on GitHub ↗
(target: HTMLElement, sourceRect: DOMRect)

Source from the content-addressed store, hash-verified

101 * @param sourceRect Dimensions of the source element.
102 */
103export 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.

Callers 1

_createPreviewMethod · 0.90

Calls 1

getTransformFunction · 0.85

Tested by

no test coverage detected