Ver código fonte

Skip projected points on mobile

main
Steve Ruiz 4 anos atrás
pai
commit
03e1904739
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3
    2
      state/sessions/draw-session.ts

+ 3
- 2
state/sessions/draw-session.ts Ver arquivo

2
 import { Data, DrawShape } from 'types'
2
 import { Data, DrawShape } from 'types'
3
 import BaseSession from './base-session'
3
 import BaseSession from './base-session'
4
 import { getShapeUtils } from 'lib/shape-utils'
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
 import * as vec from 'utils/vec'
6
 import * as vec from 'utils/vec'
7
 import commands from 'state/commands'
7
 import commands from 'state/commands'
8
 
8
 
119
 
119
 
120
     // If the delta between the averaged point and the real point is
120
     // If the delta between the averaged point and the real point is
121
     // too great, skip the temporary points. This avoids "sawblading".
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
     // Update the points and update the shape's parents.
125
     // Update the points and update the shape's parents.
125
     const shape = getShape(data, snapshot.id) as DrawShape
126
     const shape = getShape(data, snapshot.id) as DrawShape

Carregando…
Cancelar
Salvar