mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix(resize): limit minimal width & handler show up conditions
This commit is contained in:
parent
bae918302e
commit
8bec682eab
3 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue