Update state.ts

This commit is contained in:
Steve Ruiz 2021-06-30 21:34:30 +01:00
parent 778daeb8ff
commit e5408219de

View file

@ -1165,23 +1165,6 @@ const state = createState({
const point = tld.screenToWorld(payload.point, data) const point = tld.screenToWorld(payload.point, data)
coopClient.moveCursor(data.currentPageId, point) coopClient.moveCursor(data.currentPageId, point)
}, },
moveRtCursor(
data,
payload: { id: string; pageId: string; point: number[] }
) {
const { room } = data
if (room.peers[payload.id] === undefined) {
room.peers[payload.id] = {
id: payload.id,
cursor: {
point: payload.point,
},
}
}
room.peers[payload.id].cursor.point = payload.point
},
clearRoom(data) { clearRoom(data) {
data.room = undefined data.room = undefined
}, },