ソースを参照

Skip projected points on mobile

main
Steve Ruiz 4年前
コミット
03e1904739
1個のファイルの変更3行の追加2行の削除
  1. 3
    2
      state/sessions/draw-session.ts

+ 3
- 2
state/sessions/draw-session.ts ファイルの表示

@@ -2,7 +2,7 @@ import { current } from 'immer'
2 2
 import { Data, DrawShape } from 'types'
3 3
 import BaseSession from './base-session'
4 4
 import { getShapeUtils } from 'lib/shape-utils'
5
-import { getPage, getShape, updateParents } from 'utils/utils'
5
+import { getPage, getShape, isMobile, updateParents } from 'utils/utils'
6 6
 import * as vec from 'utils/vec'
7 7
 import commands from 'state/commands'
8 8
 
@@ -119,7 +119,8 @@ export default class BrushSession extends BaseSession {
119 119
 
120 120
     // If the delta between the averaged point and the real point is
121 121
     // too great, skip the temporary points. This avoids "sawblading".
122
-    const tooFarForTemporaryPoints = vec.dist(newPoint, temporaryPoints[3]) > 32
122
+    const tooFarForTemporaryPoints =
123
+      !isMobile() && vec.dist(newPoint, temporaryPoints[3]) > 32
123 124
 
124 125
     // Update the points and update the shape's parents.
125 126
     const shape = getShape(data, snapshot.id) as DrawShape

読み込み中…
キャンセル
保存