diff options
| author | Stanley Yip <stanley_yip@brown.edu> | 2020-02-04 18:12:47 -0500 |
|---|---|---|
| committer | Stanley Yip <stanley_yip@brown.edu> | 2020-02-04 18:12:47 -0500 |
| commit | 1007cfb325f2dcddc4365538e4b354d06eb85f2f (patch) | |
| tree | 62fb6a253e6940cadfe24aa8e96ba9f16b68ad9b /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | dab8f5893ffb8fab05a46695b9d1a690d1171bca (diff) | |
ok so the toolglass is working, but it's super slow... i'll fix that later lol
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 41ef8c2a6..17139d9d9 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -412,7 +412,11 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { this.addDocument(Docs.Create.FreeformDocument(sel, { title: "nested collection", x: bounds.x, y: bounds.y, _width: bWidth, _height: bHeight, _panX: 0, _panY: 0 })); sel.forEach(d => this.props.removeDocument(d)); break; - + case GestureUtils.Gestures.Text: + if (ge.text) { + const B = this.getTransform().transformPoint(ge.points[0].X, ge.points[0].Y); + this.addDocument(Docs.Create.TextDocument(ge.text, { title: ge.text, x: B[0], y: B[1] })); + } } } |
