zhouenguang 3 lat temu
rodzic
commit
55000abe20
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/RotationEvent.js

+ 1 - 1
src/RotationEvent.js

@@ -53,7 +53,7 @@ export default class RotationEvent {
             this.offset += offsetX
             this.offset += offsetX
 
 
             // 累计超过6度
             // 累计超过6度
-            let angle = Math.round(this.offset / canvasWidth * 2 * Math.PI / (Math.PI/30)) * (Math.PI/30)
+            let angle = Math.round(this.offset / (canvasWidth*10) * 2 * Math.PI / (Math.PI/30)) * (Math.PI/30)
             if(Math.abs(angle) < Math.PI/30) return
             if(Math.abs(angle) < Math.PI/30) return
 
 
             // 开始旋转
             // 开始旋转