aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-01 13:00:23 -0500
committerbobzel <zzzman@gmail.com>2021-03-01 13:00:23 -0500
commitbed03be10f9289e36f7e1621bbcf2579b0ca3f2d (patch)
tree0ed73a64bc054b7707008c732199133d9f50e9bd /src/client/views/nodes/ImageBox.tsx
parente4641f707946b0b6769bc736b5bae774639e88a7 (diff)
final cleanups for simplified drag and drop of annotations. fixed some issues rtf focus when creating notes in masonry view. fixed text sidebar.
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 4c3031ae2..240aa1659 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -62,13 +62,10 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps, ImageD
componentDidMount() {
this._disposers.selection = reaction(() => this.props.isSelected(),
- selected => {
- if (!selected) {
- this._savedAnnotations.values().forEach(v => v.forEach(a => a.remove()));
- this._savedAnnotations.clear();
- }
- },
- { fireImmediately: true });
+ selected => !selected && setTimeout(() => {
+ this._savedAnnotations.values().forEach(v => v.forEach(a => a.remove()));
+ this._savedAnnotations.clear();
+ }));
this._disposers.path = reaction(() => ({ nativeSize: this.nativeSize, width: this.layoutDoc[WidthSym]() }),
action(({ nativeSize, width }) => {
if (!this.layoutDoc._height) {