actually persist right panel width on resize
This commit is contained in:
parent
13491e797d
commit
541b0011ac
1 changed files with 8 additions and 1 deletions
|
@ -23,6 +23,11 @@ export default class MainSplit extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this._setResizeContainerRef = this._setResizeContainerRef.bind(this);
|
this._setResizeContainerRef = this._setResizeContainerRef.bind(this);
|
||||||
|
this._onResized = this._onResized.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
_onResized(size) {
|
||||||
|
window.localStorage.setItem("mx_rhs_size", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
_createResizer() {
|
_createResizer() {
|
||||||
|
@ -33,7 +38,9 @@ export default class MainSplit extends React.Component {
|
||||||
};
|
};
|
||||||
const resizer = new Resizer(
|
const resizer = new Resizer(
|
||||||
this.resizeContainer,
|
this.resizeContainer,
|
||||||
FixedDistributor);
|
FixedDistributor,
|
||||||
|
{onResized: this._onResized},
|
||||||
|
);
|
||||||
resizer.setClassNames(classNames);
|
resizer.setClassNames(classNames);
|
||||||
const rhsSize = window.localStorage.getItem("mx_rhs_size");
|
const rhsSize = window.localStorage.getItem("mx_rhs_size");
|
||||||
if (rhsSize !== null) {
|
if (rhsSize !== null) {
|
||||||
|
|
Loading…
Reference in a new issue