undo unneeded changes

This commit is contained in:
Bruno Windels 2019-01-08 12:05:06 +01:00
parent c6952ba5b6
commit c9272c48e0
3 changed files with 1 additions and 21 deletions

View file

@ -72,16 +72,12 @@ export default class MainSplit extends React.Component {
componentDidUpdate(prevProps) {
const shouldAllowResizing =
!this.props.disableSizing &&
!this.props.collapsedRhs &&
this.props.panel;
if (shouldAllowResizing && !this.resizer) {
this._createResizer();
} else if (!shouldAllowResizing && this.resizer) {
if (this.props.disableSizing) {
this.resizer.clearItemSizes();
}
this.resizer.detach();
this.resizer = null;
}

View file

@ -43,14 +43,6 @@ export class Resizer {
this._onMouseDown = this._onMouseDown.bind(this);
}
clearItemSizes() {
const handles = this._getResizeHandles();
handles.forEach((handle) => {
const {sizer, item} = this._createSizerAndDistributor(handle);
sizer.clearItemSize(item);
});
}
setClassNames(classNames) {
this.classNames = classNames;
}
@ -142,7 +134,7 @@ export class Resizer {
const distributor = new this.distributorCtor(
sizer, item, id, this.distributorCfg,
items, this.container);
return {sizer, distributor, item};
return {sizer, distributor};
}
_getResizableItems() {

View file

@ -82,14 +82,6 @@ class Sizer {
}
}
clearItemSize(item, size) {
if (this.vertical) {
item.style.height = null;
} else {
item.style.width = null;
}
}
/**
@param {MouseEvent} event the mouse event
@return {number} the distance between the cursor and the edge of the container,