From 2d96f9a25de2d3996a8663b4f459d3f482d51398 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 28 Oct 2021 12:35:33 -0400 Subject: selection of link lines deselects everything else first. --- src/client/util/SelectionManager.ts | 3 ++- .../collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index dbe7b3ebc..2cba2c1f2 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -57,7 +57,8 @@ export namespace SelectionManager { export function SelectView(docView: DocumentView, ctrlPressed: boolean): void { manager.SelectView(docView, ctrlPressed); } - export function SelectSchemaViewDoc(document: Opt): void { + export function SelectSchemaViewDoc(document: Opt, deselectAllFirst?: boolean): void { + if (deselectAllFirst) manager.DeselectAll(); manager.SelectSchemaViewDoc(document); } diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 07b4789e7..9769453a0 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -199,7 +199,7 @@ export class CollectionFreeFormLinkView extends React.Component SelectionManager.SelectSchemaViewDoc(this.props.LinkDocs[0])} + onClick={() => SelectionManager.SelectSchemaViewDoc(this.props.LinkDocs[0], true)} d={`M ${pt1[0]} ${pt1[1]} C ${pt1[0] + pt1norm[0]} ${pt1[1] + pt1norm[1]}, ${pt2[0] + pt2norm[0]} ${pt2[1] + pt2norm[1]}, ${pt2[0]} ${pt2[1]}`} /> {textX === undefined ? (null) : {Field.toString(this.props.LinkDocs[0].description as any as Field)} -- cgit v1.2.3-70-g09d2