aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-09-19 15:39:56 -0400
committerbobzel <zzzman@gmail.com>2023-09-19 15:39:56 -0400
commit174c86efd17f40b3bca402b253eb8026848dfe0b (patch)
treeec059cbb4350dc95fb74faec9affddb43793eeec
parentbe8ec99f04405fea89f42b98b318ad023fb58821 (diff)
fixed pinning ink strokes to honor save layout/content.
-rw-r--r--src/client/views/InkingStroke.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index f5ffff639..3b9edbc56 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) return subAnchor;
if (!addAsAnnotation && !pinProps) return this.rootDoc;