aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-12-03 17:57:37 -0500
committeryipstanley <stanley_yip@brown.edu>2019-12-03 17:57:37 -0500
commitcb2edb837ffa9df5ad966d44ac0c26622d6579f0 (patch)
treeb90f01218511c26c69f862075953ce0196c4517d /src/client
parent2781f77d46612720865ac0c1d115d6e013806103 (diff)
first hint of recognizer?
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 7267e94be..dcda13b00 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -337,9 +337,16 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
if (this._points.length > 1) {
let B = this.svgBounds;
let points = this._points.map(p => ({ x: p.x - B.left, y: p.y - B.top }));
- let inkDoc = Docs.Create.InkDocument(InkingControl.Instance.selectedColor, InkingControl.Instance.selectedTool, parseInt(InkingControl.Instance.selectedWidth), points, { width: B.width, height: B.height, x: B.left, y: B.top });
- this.addDocument(inkDoc);
- this._points = [];
+
+ let result = Utils.GestureRecognizer.Recognize(new Array(points));
+ if (result) {
+ console.log(result.Name);
+ }
+ else {
+ let inkDoc = Docs.Create.InkDocument(InkingControl.Instance.selectedColor, InkingControl.Instance.selectedTool, parseInt(InkingControl.Instance.selectedWidth), points, { width: B.width, height: B.height, x: B.left, y: B.top });
+ this.addDocument(inkDoc);
+ this._points = [];
+ }
}
document.removeEventListener("pointermove", this.onPointerMove);