From 84f728cffb94319b86be8d6cc478ce424ec45c2f Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 20 Jan 2023 11:17:38 -0500 Subject: removed tour map from lightbox. added option to create anchors without adding thm as annotations. made zoom of text an option for pres and links --- .../collectionFreeForm/CollectionFreeFormLinkView.tsx | 2 +- .../collectionFreeForm/CollectionFreeFormView.tsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/client/views/collections/collectionFreeForm') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 8919b1c01..9811c239b 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -290,7 +290,7 @@ export class CollectionFreeFormLinkView extends React.Component { + getAnchor = (addAsAnnotation: boolean) => { if (this.props.Document.annotationOn) { return this.rootDoc; } @@ -1574,10 +1574,12 @@ export class CollectionFreeFormView extends CollectionSubView([]); - if (Cast(this.dataDoc[this.props.fieldKey + '-annotations'], listSpec(Doc), null) !== undefined) { - Cast(this.dataDoc[this.props.fieldKey + '-annotations'], listSpec(Doc), []).push(anchor); - } else { - this.dataDoc[this.props.fieldKey + '-annotations'] = new List([anchor]); + if (addAsAnnotation) { + if (Cast(this.dataDoc[this.props.fieldKey + '-annotations'], listSpec(Doc), null) !== undefined) { + Cast(this.dataDoc[this.props.fieldKey + '-annotations'], listSpec(Doc), []).push(anchor); + } else { + this.dataDoc[this.props.fieldKey + '-annotations'] = new List([anchor]); + } } return anchor; }; -- cgit v1.2.3-70-g09d2