fix(resize): limit minimal width & handler show up conditions

This commit is contained in:
EnixCoda 2018-06-30 19:36:55 +08:00
parent bae918302e
commit 8bec682eab
3 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ export default class Resizable extends React.PureComponent {
size: this.props.baseSize,
}
onResize = size => this.setState({ size })
onResize = size => this.setState({ size: Math.max(this.props.baseSize, size) })
render() {
const { className, children } = this.props

View file

@ -40,7 +40,7 @@ export default class ResizeHandler extends React.PureComponent {
onPointerUp = () => {
this.pointerDown = false
this.baseSize += this.delta
this.baseSize = Math.max(this.baseSize + this.delta, this.props.size)
this.unsubscribeEvents()
}

View file

@ -139,7 +139,7 @@
user-select: none;
border-left: 1px solid #e1e4e8;
@media screen and (min-width: @min-screen-width) {
@media screen and (min-width: (@min-screen-width + @side-bar-base-width + @resize-handler-width * 2)) {
display: flex;
align-items: center;
}