diff options
| author | bobzel <zzzman@gmail.com> | 2021-02-08 19:25:48 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-02-08 19:25:48 -0500 |
| commit | 0e5891eab7f53697b764b7e9da5163db0351a0a2 (patch) | |
| tree | 41f0b00acf4cf31ad6dee451612d4f4b6f870133 /src/client/views/GestureOverlay.tsx | |
| parent | 32a0d5be4ff7a49b554806c27dca5b63ea80277f (diff) | |
overhaul of link anchors on text boxes to use actual Documents to represent selected text. Also got rid of _scrollY and _scrollPreviewY so that all document regions can be focused on using focus() and the new scrollFocus() mechanisim
Diffstat (limited to 'src/client/views/GestureOverlay.tsx')
| -rw-r--r-- | src/client/views/GestureOverlay.tsx | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx index 76cb0112e..9306cf9ae 100644 --- a/src/client/views/GestureOverlay.tsx +++ b/src/client/views/GestureOverlay.tsx @@ -516,7 +516,7 @@ export class GestureOverlay extends Touchable { } handleLineGesture = (): boolean => { - let actionPerformed = false; + const actionPerformed = false; const B = this.svgBounds; // get the two targets at the ends of the line @@ -525,21 +525,6 @@ export class GestureOverlay extends Touchable { const target1 = document.elementFromPoint(ep1.X, ep1.Y); const target2 = document.elementFromPoint(ep2.X, ep2.Y); - // callback function to be called by each target - const callback = (doc: Doc) => { - if (!this._d1) { - this._d1 = doc; - } - // we don't want to create a link of both endpoints are the same document (doing so makes drawing an l very hard) - else if (this._d1 !== doc && !LinkManager.Instance.doesLinkExist(this._d1, doc)) { - // we don't want to create a link between ink strokes (doing so makes drawing a t very hard) - if (this._d1.type !== "ink" && doc.type !== "ink") { - DocUtils.MakeLink({ doc: this._d1 }, { doc: doc }, "gestural link", ""); - actionPerformed = true; - } - } - }; - const ge = new CustomEvent<GestureUtils.GestureEvent>("dashOnGesture", { bubbles: true, |
