aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LinkBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
committerbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
commit001127c07f95173d7036db19d07dcfb1135f3caa (patch)
tree6489446110038835536f1916791cfe6faa793bc3 /src/client/views/nodes/LinkBox.tsx
parent953a298b49c2345741fd7989f9b62cadd76eea52 (diff)
fixed schema rows to render, fix for resizing docs from left side. all locking docs in non freeform view. fix for labelBox with multiple rows to keep top rows. cleaned up docViewPath/containerViewPath &
Diffstat (limited to 'src/client/views/nodes/LinkBox.tsx')
-rw-r--r--src/client/views/nodes/LinkBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/LinkBox.tsx b/src/client/views/nodes/LinkBox.tsx
index 4221f464d..ba34255dc 100644
--- a/src/client/views/nodes/LinkBox.tsx
+++ b/src/client/views/nodes/LinkBox.tsx
@@ -29,12 +29,12 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
@computed get anchor1() {
const anchor1 = DocCast(this.dataDoc.link_anchor_1);
const anchor_1 = anchor1?.layout_unrendered ? DocCast(anchor1.annotationOn) : anchor1;
- return DocumentManager.Instance.getDocumentView(anchor_1, this.containerViewPath?.().lastElement());
+ return DocumentManager.Instance.getDocumentView(anchor_1, this.DocumentView?.().containerViewPath?.().lastElement());
}
@computed get anchor2() {
const anchor2 = DocCast(this.dataDoc.link_anchor_2);
const anchor_2 = anchor2?.layout_unrendered ? DocCast(anchor2.annotationOn) : anchor2;
- return DocumentManager.Instance.getDocumentView(anchor_2, this.containerViewPath?.().lastElement());
+ return DocumentManager.Instance.getDocumentView(anchor_2, this.DocumentView?.().containerViewPath?.().lastElement());
}
screenBounds = () => {
if (this.layoutDoc._layout_isSvg && this.anchor1 && this.anchor2 && this.anchor1.CollectionFreeFormView) {
@@ -66,7 +66,7 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
const a = (this.anchor1 ?? this.anchor2)!;
const b = (this.anchor2 ?? this.anchor1)!;
- const parxf = this.containerViewPath?.().lastElement().ComponentView as CollectionFreeFormView;
+ const parxf = this.DocumentView?.().containerViewPath?.().lastElement().ComponentView as CollectionFreeFormView;
const this_xf = parxf?.screenToFreeformContentsXf ?? Transform.Identity; //this.ScreenToLocalTransform();
const a_invXf = a.screenToViewTransform().inverse();
const b_invXf = b.screenToViewTransform().inverse();