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;
|
const { selection, clientRect } = evt;
|
||||||
if (selection) {
|
if (selection) {
|
||||||
this.setState({
|
this.setState({
|
||||||
selectionBounds: clientRect,
|
selectedAnnotation: null,
|
||||||
selectedAnnotation: selection
|
selectionBounds: null
|
||||||
});
|
}, () => this.setState({
|
||||||
|
selectedAnnotation: selection,
|
||||||
|
selectionBounds: clientRect
|
||||||
|
}))
|
||||||
} else {
|
} else {
|
||||||
this.clearState();
|
this.clearState();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue