mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-21 21:32:13 +01:00
Use translate3d for layout transforms to trick browser into using GPU acceleration (#85)
This commit is contained in:
parent
23e1c8797d
commit
c9cf88eb5e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user