Regression fix: editor no longer reset when zooming in OSD
This commit is contained in:
parent
26d88f9818
commit
198a66f6ed
|
@ -37,10 +37,14 @@ export default class Editor extends Component {
|
||||||
const { selectionBounds } = this.state;
|
const { selectionBounds } = this.state;
|
||||||
const nextBounds = bounds(next.selectedElement);
|
const nextBounds = bounds(next.selectedElement);
|
||||||
|
|
||||||
this.setState({
|
if (this.props.annotation?.id !== next.annotation.id) {
|
||||||
currentAnnotation: next.annotation,
|
this.setState({
|
||||||
selectionBounds: nextBounds
|
currentAnnotation: next.annotation,
|
||||||
});
|
selectionBounds: nextBounds
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.setState({ selectionBounds: nextBounds });
|
||||||
|
}
|
||||||
|
|
||||||
if (this.props.modifiedTarget != next.modifiedTarget) {
|
if (this.props.modifiedTarget != next.modifiedTarget) {
|
||||||
// Update in case target was changed (move, resize)
|
// Update in case target was changed (move, resize)
|
||||||
|
|
Loading…
Reference in New Issue