Fixed partial render problem when switching between annotations
This commit is contained in:
parent
c71b6b1683
commit
b5e640bd34
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue