From a2bec39bc152f7493e4171b6446040fa381e6463 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <abdullah_ahmed@brown.edu>
Date: Sun, 17 Mar 2019 20:57:20 -0400
Subject: added tuple field, beginnig remote cursor display

---
 src/client/views/collections/CollectionFreeFormView.tsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'src/client/views/collections/CollectionFreeFormView.tsx')

diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index bb28dd20a..a3a596c37 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -322,6 +322,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
         return (
             <div className={`collectionfreeformview${this.isAnnotationOverlay ? "-overlay" : "-container"}`}
                 onPointerDown={this.onPointerDown}
+                onPointerMove={(e) => super.setCursorPosition(this.props.ScreenToLocalTransform().transformPoint(e.screenX, e.screenY))}
                 onWheel={this.onPointerWheel}
                 onDrop={this.onDrop.bind(this)}
                 onDragOver={this.onDragOver}
@@ -329,6 +330,20 @@ export class CollectionFreeFormView extends CollectionViewBase {
                 style={{ borderWidth: `${COLLECTION_BORDER_WIDTH}px`, }}
                 tabIndex={0}
                 ref={this.createDropTarget}>
+                {super.getCursors().map(entry => {
+                    let point = entry.Data[1]
+                    return (
+                        <div
+                            style={{
+                                position: 'absolute',
+                                left: point[0],
+                                top: point[1],
+                                borderRadius: "50%",
+                                background: "pink"
+                            }}
+                        />
+                    );
+                })}
                 <div className="collectionfreeformview"
                     style={{ transformOrigin: "left top", transform: `translate(${dx}px, ${dy}px) scale(${this.zoomScaling}, ${this.zoomScaling}) translate(${panx}px, ${pany}px)` }}
                     ref={this._canvasRef}>
-- 
cgit v1.2.3-70-g09d2

