|
|
@@ -38,6 +38,7 @@ const state = createState({
|
|
38
|
38
|
onEnter: "startBrushSession",
|
|
39
|
39
|
on: {
|
|
40
|
40
|
MOVED_POINTER: "updateBrushSession",
|
|
|
41
|
+ PANNED_CAMERA: "updateBrushSession",
|
|
41
|
42
|
STOPPED_POINTING: { do: "completeSession", to: "selecting" },
|
|
42
|
43
|
CANCELLED: { do: "cancelSession", to: "selecting" },
|
|
43
|
44
|
},
|
|
|
@@ -52,11 +53,14 @@ const state = createState({
|
|
52
|
53
|
session.complete(data)
|
|
53
|
54
|
session = undefined
|
|
54
|
55
|
},
|
|
55
|
|
- startBrushSession(data, { point }) {
|
|
56
|
|
- session = new Sessions.BrushSession(data, point)
|
|
|
56
|
+ startBrushSession(data, payload: { point: number[] }) {
|
|
|
57
|
+ session = new Sessions.BrushSession(
|
|
|
58
|
+ data,
|
|
|
59
|
+ screenToWorld(payload.point, data)
|
|
|
60
|
+ )
|
|
57
|
61
|
},
|
|
58
|
|
- updateBrushSession(data, { point }) {
|
|
59
|
|
- session.update(data, point)
|
|
|
62
|
+ updateBrushSession(data, payload: { point: number[] }) {
|
|
|
63
|
+ session.update(data, screenToWorld(payload.point, data))
|
|
60
|
64
|
},
|
|
61
|
65
|
zoomCamera(data, payload: { delta: number; point: number[] }) {
|
|
62
|
66
|
const { camera } = data
|