mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-23 16:58:30 +00:00
Use translate3d for layout transforms to trick browser into using GPU acceleration (#85)
This commit is contained in:
parent
23e1c8797d
commit
c9cf88eb5e
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue