diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-25 11:43:35 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-25 11:43:35 -0500 |
| commit | caf0d282833aa0b469dfdec0c7f47174da0204aa (patch) | |
| tree | 5c896c668edc0d389dd3e89e9340b744bcbc4bf4 /src/client/views/collections/collectionFreeForm | |
| parent | 3de5516fd4516654da1334ac9fecc2e568e15423 (diff) | |
| parent | e2023a6bd7d52569b802a1889119b2faa9ace4c0 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into script_documents
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 4840bb7e7..0639d74a8 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -501,9 +501,9 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P console.log("end"); if (this._inkToTextStartX && this._inkToTextStartY) { const end = this.getTransform().transformPoint(Math.max(...ge.points.map(p => p.X)), Math.max(...ge.points.map(p => p.Y))); - const setDocs = this.getActiveDocuments().filter(s => s.proto?.type === "text" && s.color); + const setDocs = this.getActiveDocuments().filter(s => s.proto?.type === "rtf" && s.color); const sets = setDocs.map((sd) => { - return Cast(sd.data, RichTextField)?.Text as string; + return Cast(sd.text, RichTextField)?.Text as string; }); if (sets.length && sets[0]) { this._wordPalette.clear(); @@ -539,6 +539,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P } }); + console.log(this._wordPalette) CognitiveServices.Inking.Appliers.InterpretStrokes(strokes).then((results) => { console.log(results); const wordResults = results.filter((r: any) => r.category === "inkWord"); |
