aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkingStroke.tsx
diff options
context:
space:
mode:
authoryunahi <60233430+yunahi@users.noreply.github.com>2020-07-28 01:53:21 +0900
committeryunahi <60233430+yunahi@users.noreply.github.com>2020-07-28 01:53:21 +0900
commite8caa12dc736ef66741b5652425b0cb8b0a5eb16 (patch)
treeafd47f6b46d1d9c1d814650b2590b738cd36c495 /src/client/views/InkingStroke.tsx
parentf3a331573be09115f9a92b8e927081f8f743c478 (diff)
parentf869c7a75eb6a2f6e6301aa76c57e383b41d3fea (diff)
merge fix
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
-rw-r--r--src/client/views/InkingStroke.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index b03d8e79b..5892e8346 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -78,6 +78,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume
this._controlNum = 0;
}
+ public static MaskDim = 50000;
render() {
TraceMobx();
const data: InkData = Cast(this.dataDoc[this.fieldKey], InkField)?.inkData ?? [];
@@ -168,16 +169,16 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume
height={height}
style={{
pointerEvents: this.props.Document.isInkMask ? "all" : "none",
- transform: this.props.Document.isInkMask ? "translate(2500px, 2500px)" : undefined,
+ transform: this.props.Document.isInkMask ? `translate(${InkingStroke.MaskDim / 2}px, ${InkingStroke.MaskDim / 2}px)` : undefined,
mixBlendMode: this.layoutDoc.tool === InkTool.Highlighter ? "multiply" : "unset",
overflow: "visible",
}}
onContextMenu={() => {
const cm = ContextMenu.Instance;
if (cm) {
- cm.addItem({ description: "Analyze Stroke", event: this.analyzeStrokes, icon: "paint-brush" });
+ !Doc.UserDoc().noviceMode && cm.addItem({ description: "Recognize Writing", event: this.analyzeStrokes, icon: "paint-brush" });
cm.addItem({ description: "Make Mask", event: this.makeMask, icon: "paint-brush" });
- cm.addItem({ description: "Format Shape", event: this.formatShape, icon: "paint-brush" });
+ cm.addItem({ description: "Format Shape...", event: this.formatShape, icon: "paint-brush" });
}
}}
><defs>