Made auto-position behavior optional

This commit is contained in:
Rainer Simon 2021-09-05 07:55:52 +02:00
parent 38f0313290
commit 590b430fb3
1 changed files with 6 additions and 1 deletions

View File

@ -62,8 +62,13 @@ export default class Editor extends Component {
}
componentDidMount() {
// Defaults to true
const autoPosition =
this.props.autoPosition === undefined ? true : this.props.autoPosition;
// Init observer (triggers setPosition once)
this.removeObserver = this.initResizeObserver();
if (autoPosition)
this.removeObserver = this.initResizeObserver();
}
componentWillUnmount() {