Fixed partial render problem when switching between annotations

This commit is contained in:
Rainer Simon 2020-04-16 21:14:18 +02:00
parent c71b6b1683
commit b5e640bd34
1 changed files with 6 additions and 3 deletions

View File

@ -61,9 +61,12 @@ export default class TextAnnotator extends Component {
const { selection, clientRect } = evt;
if (selection) {
this.setState({
selectionBounds: clientRect,
selectedAnnotation: selection
});
selectedAnnotation: null,
selectionBounds: null
}, () => this.setState({
selectedAnnotation: selection,
selectionBounds: clientRect
}))
} else {
this.clearState();
}