diff options
author | Sophie Zhang <sophie_zhang@brown.edu> | 2023-09-21 22:33:24 -0400 |
---|---|---|
committer | Sophie Zhang <sophie_zhang@brown.edu> | 2023-09-21 22:33:24 -0400 |
commit | daa2bc99bf36e7f2994f6824d9ead3d4b0ffb33f (patch) | |
tree | d05e5ca234d6959e1f97c1a2e3e247d44d280c9f /src/client/views/InkingStroke.tsx | |
parent | 0d6c1aa1869963e548374c634a65b27f0ea32de9 (diff) | |
parent | dea73e7a5b72a7f709cde4ec438244af1963392d (diff) |
Merge branch 'master' into sophie-report-manager
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
-rw-r--r-- | src/client/views/InkingStroke.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index f5ffff639..f63a27426 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -82,9 +82,8 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps>() { screenToLocal = () => this.props.ScreenToLocalTransform().scale(this.props.NativeDimScaling?.() || 1); getAnchor = (addAsAnnotation: boolean, pinProps?: PinProps) => { - if (this._subContentView) { - return this._subContentView.getAnchor?.(addAsAnnotation) || this.rootDoc; - } + const subAnchor = this._subContentView?.getAnchor?.(addAsAnnotation); + if (subAnchor !== this.rootDoc && subAnchor) return subAnchor; if (!addAsAnnotation && !pinProps) return this.rootDoc; |