diff options
author | bobzel <zzzman@gmail.com> | 2023-09-07 10:04:27 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-07 10:04:27 -0400 |
commit | 8485c5430d7feb5eee9cf3e0374afe7fbf0e60cd (patch) | |
tree | 8d94c00c702907a59546deb1d1417a91f13172a4 /src/client/views/nodes/ImageBox.tsx | |
parent | 7a08e2b50696dd1063fa9ad323c8fca5c2fc5886 (diff) |
fixed removing map pins to not reappear. updated config anchors to not be added to annotations list. fixed imageBox to not pass its configs on to its parent collection when focusing.
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index a19cc3555..9eaebfc8c 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -97,7 +97,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp }); if (anchor) { if (!addAsAnnotation) anchor.backgroundColor = 'transparent'; - (addAsAnnotation || visibleAnchor) && this.addDocument(anchor); + addAsAnnotation && visibleAnchor && this.addDocument(anchor); PresBox.pinDocView(anchor, { pinDocLayout: pinProps?.pinDocLayout, pinData: { ...(pinProps?.pinData ?? {}), pannable: visibleAnchor ? false : true } }, this.rootDoc); return anchor; } @@ -503,7 +503,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp this._marqueeing = undefined; this.props.select(false); }; - focus = (anchor: Doc, options: DocFocusOptions) => this._ffref.current?.focus(anchor, options); + focus = (anchor: Doc, options: DocFocusOptions) => (anchor.type === DocumentType.CONFIG ? undefined : this._ffref.current?.focus(anchor, options)); _ffref = React.createRef<CollectionFreeFormView>(); savedAnnotations = () => this._savedAnnotations; |