From c9272c48e0834f953743ccb01911743c0bfa663a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 8 Jan 2019 12:05:06 +0100 Subject: [PATCH] undo unneeded changes --- src/components/structures/MainSplit.js | 4 ---- src/resizer/resizer.js | 10 +--------- src/resizer/sizer.js | 8 -------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/components/structures/MainSplit.js b/src/components/structures/MainSplit.js index aa27930ce0..e1bbde1d97 100644 --- a/src/components/structures/MainSplit.js +++ b/src/components/structures/MainSplit.js @@ -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; } diff --git a/src/resizer/resizer.js b/src/resizer/resizer.js index ff2120b341..0e113b3664 100644 --- a/src/resizer/resizer.js +++ b/src/resizer/resizer.js @@ -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() { diff --git a/src/resizer/sizer.js b/src/resizer/sizer.js index 0e2236814e..303214854b 100644 --- a/src/resizer/sizer.js +++ b/src/resizer/sizer.js @@ -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,