瀏覽代碼

开启硬件加速

evilemon 7 年之前
父節點
當前提交
f76118812e
共有 2 個文件被更改,包括 2 次插入2 次删除
  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
             },