({
top,
left,
width,
height
}: Position)
| 26 | * @returns CSS style object |
| 27 | */ |
| 28 | export function setTransform({ |
| 29 | top, |
| 30 | left, |
| 31 | width, |
| 32 | height |
| 33 | }: Position): Record<string, string> { |
| 34 | const translate = `translate(${left}px,${top}px)`; |
| 35 | return { |
| 36 | transform: translate, |
| 37 | WebkitTransform: translate, |
| 38 | MozTransform: translate, |
| 39 | msTransform: translate, |
| 40 | OTransform: translate, |
| 41 | width: `${width}px`, |
| 42 | height: `${height}px`, |
| 43 | position: "absolute" |
| 44 | }; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Generate CSS top/left positioning styles. |
no outgoing calls
no test coverage detected
searching dependent graphs…