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

Function getTransform

src/cdk/drag-drop/dom/styling.ts:114–118  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

112 * @param y Desired position of the element along the Y axis.
113 */
114export function getTransform(x: number, y: number): string {
115 // Round the transforms since some browsers will
116 // blur the elements for sub-pixel transforms.
117 return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;
118}

Callers 5

resetToBoundaryMethod · 0.90
_createPreviewMethod · 0.90
matchElementSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected