1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00
This commit is contained in:
Michael An
2019-02-28 21:35:22 +08:00
committed by Daniel Pan
parent 29ee2c92ea
commit 705cc67f3b

View File

@@ -89,6 +89,7 @@ class DirColumnView extends React.Component {
} }
onResizeMouseDown = () => { onResizeMouseDown = () => {
this.containerWidth = this.refs.viewModeContainer.clientWidth;
this.setState({ this.setState({
inResizing: true inResizing: true
}); });
@@ -134,7 +135,6 @@ class DirColumnView extends React.Component {
} }
componentDidMount() { componentDidMount() {
this.containerWidth = this.refs.viewModeContainer.clientWidth;
let rate = this.getCookie('navRate'); let rate = this.getCookie('navRate');
if (rate) { if (rate) {
this.setState({ this.setState({
@@ -148,7 +148,7 @@ class DirColumnView extends React.Component {
const select = this.state.inResizing ? 'none' : ''; const select = this.state.inResizing ? 'none' : '';
const mainFlex = '1 0 ' + (1 - this.state.navRate) * 100 + '%'; const mainFlex = '1 0 ' + (1 - this.state.navRate) * 100 + '%';
return ( return (
<div className="cur-view-content view-mode-container" onMouseMove={onResizeMove} onMouseUp={this.onResizeMouseUp} ref="viewModeContainer"> <div className="d-flex" onMouseMove={onResizeMove} onMouseUp={this.onResizeMouseUp} ref="viewModeContainer">
<DirColumnNav <DirColumnNav
currentPath={this.props.path} currentPath={this.props.path}
repoPermission={this.props.repoPermission} repoPermission={this.props.repoPermission}