Jelajahi Sumber

开启硬件加速

evilemon 7 tahun lalu
induk
melakukan
f76118812e
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      src/lib/dragger/base.tsx
  2. 1 1
      src/lib/dragger/index.tsx

+ 1 - 1
src/lib/dragger/base.tsx

@@ -444,7 +444,7 @@ export class Dragger extends React.Component<DraggerProps, {}> {
                 style={{
                     ...style,
                     touchAction: 'none!important',
-                    transform: `translate(${x}px,${y}px)`,
+                    transform: `translate3d(${x}px,${y}px,0px)`,
                     width: w,
                     height: h,
                 }}

+ 1 - 1
src/lib/dragger/index.tsx

@@ -389,7 +389,7 @@ export class Dragger extends React.Component<DraggerProps, {}> {
             style: {
                 ...style,
                 touchAction: 'none!important',
-                transform: `translate(${x}px,${y}px)`,
+                transform: `translate3d(${x}px,${y}px,0px)`,
                 width: w,
                 height: h
             },