Made equality check stricter, so annotation updates can be injected via API
This commit is contained in:
parent
6f68fc63fd
commit
56ca3a74d8
|
@ -37,7 +37,7 @@ export default class Editor extends Component {
|
||||||
const { selectionBounds } = this.state;
|
const { selectionBounds } = this.state;
|
||||||
const nextBounds = bounds(next.selectedElement);
|
const nextBounds = bounds(next.selectedElement);
|
||||||
|
|
||||||
if (this.props.annotation?.id !== next.annotation.id) {
|
if (!this.props.annotation?.isEqual(next.annotation)) {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentAnnotation: next.annotation,
|
currentAnnotation: next.annotation,
|
||||||
selectionBounds: nextBounds
|
selectionBounds: nextBounds
|
||||||
|
|
Loading…
Reference in New Issue