diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-01-22 19:06:47 -0500 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-01-22 19:06:47 -0500 |
| commit | 720958ce62337e719a77f2ce43847011a35b6d09 (patch) | |
| tree | 63b5e4b2866693108d82fe92745cd5d17f259736 /src/client/views/InkingStroke.tsx | |
| parent | 70344f575caf32ae4bef5ec7f0228da2e6271d59 (diff) | |
| parent | 10b759d2bd09af3a8e8a4effbc8fd2312dd873d2 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into filters
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
| -rw-r--r-- | src/client/views/InkingStroke.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 8df7f7eef..19b23af13 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -6,7 +6,7 @@ import { InkData, InkField, InkTool } from "../../fields/InkField"; import { makeInterface } from "../../fields/Schema"; import { Cast, StrCast } from "../../fields/Types"; import { TraceMobx } from "../../fields/util"; -import { setupMoveUpEvents } from "../../Utils"; +import { setupMoveUpEvents, emptyFunction, returnFalse } from "../../Utils"; import { CognitiveServices } from "../cognitive_services/CognitiveServices"; import { InteractionUtils } from "../util/InteractionUtils"; import { Scripting } from "../util/Scripting"; @@ -87,6 +87,11 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume } } + onPointerDown = (e: React.PointerEvent) => { + this.props.isSelected(true) && setupMoveUpEvents(this, e, returnFalse, emptyFunction, action((e: PointerEvent, doubleTap: boolean | undefined) => { + doubleTap && InkStrokeProperties.Instance && (InkStrokeProperties.Instance._controlBtn = true); + })); + } public static MaskDim = 50000; render() { @@ -196,6 +201,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume mixBlendMode: this.layoutDoc.tool === InkTool.Highlighter ? "multiply" : "unset", overflow: "visible", }} + onPointerDown={this.onPointerDown} onContextMenu={() => { const cm = ContextMenu.Instance; if (cm) { |
