mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Use translate3d for layout transforms to trick browser into using GPU acceleration (#85)
This commit is contained in:
@@ -83,7 +83,7 @@ export function determineDropDirection(dimensions?: Dimensions, offset?: XYCoord
|
||||
|
||||
export function setTransform({ top, left, width, height }: Dimensions, setSize: boolean = true): CSSProperties {
|
||||
// Replace unitless items with px
|
||||
const translate = `translate(${left}px,${top}px)`;
|
||||
const translate = `translate3d(${left}px,${top}px, 0)`;
|
||||
return {
|
||||
top: 0,
|
||||
left: 0,
|
||||
|
||||
Reference in New Issue
Block a user