aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-05-08 23:16:24 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-05-08 23:16:24 -0400
commit508410d810f61b8f8602dedbbba3e0736c1f5ba3 (patch)
treeb6de0f335ed187f7e795025ba9a304b3146fc6a2 /src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
parent086391b7e45ed4b3cb29602a776f5812f142fff2 (diff)
parent890d43c23c5aaafc8ebc2978cd1ad2e19bfcd830 (diff)
Working implementation of remote cursors
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
index c22f430ac..642118d75 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormRemoteCursors.tsx
@@ -22,11 +22,8 @@ export class CollectionFreeFormRemoteCursors extends React.Component<CollectionV
}
let cursors = Cast(doc.cursors, listSpec(CursorField));
- if (!cursors) {
- doc.cursors = cursors = new List<CursorField>();
- }
- return cursors.filter(cursor => cursor.data.metadata.id !== id);
+ return (cursors || []).filter(cursor => cursor.data.metadata.id !== id);
}
private crosshairs?: HTMLCanvasElement;
@@ -62,7 +59,6 @@ export class CollectionFreeFormRemoteCursors extends React.Component<CollectionV
}
}
- @computed
get sharedCursors() {
return this.getCursors().map(c => {
let m = c.data.metadata;