actually persist right panel width on resize

This commit is contained in:
Bruno Windels 2018-12-03 10:43:35 +01:00
parent 13491e797d
commit 541b0011ac

View file

@ -23,6 +23,11 @@ export default class MainSplit extends React.Component {
constructor(props) {
super(props);
this._setResizeContainerRef = this._setResizeContainerRef.bind(this);
this._onResized = this._onResized.bind(this);
}
_onResized(size) {
window.localStorage.setItem("mx_rhs_size", size);
}
_createResizer() {
@ -33,7 +38,9 @@ export default class MainSplit extends React.Component {
};
const resizer = new Resizer(
this.resizeContainer,
FixedDistributor);
FixedDistributor,
{onResized: this._onResized},
);
resizer.setClassNames(classNames);
const rhsSize = window.localStorage.getItem("mx_rhs_size");
if (rhsSize !== null) {