mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
undo unneeded changes
This commit is contained in:
parent
c6952ba5b6
commit
c9272c48e0
3 changed files with 1 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue