From 56ca3a74d87623c886d01dee9695ad90f1a82a59 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Thu, 12 Aug 2021 14:30:59 +0200 Subject: [PATCH] Made equality check stricter, so annotation updates can be injected via API --- src/editor/Editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 8f47954..197d278 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -37,7 +37,7 @@ export default class Editor extends Component { const { selectionBounds } = this.state; const nextBounds = bounds(next.selectedElement); - if (this.props.annotation?.id !== next.annotation.id) { + if (!this.props.annotation?.isEqual(next.annotation)) { this.setState({ currentAnnotation: next.annotation, selectionBounds: nextBounds