0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00
Limit divider position
This commit is contained in:
Trevor Buckner
2021-10-20 10:55:28 -04:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -40,8 +40,12 @@ const SplitPane = createClass({
},
handleMove : function(e){
if(!this.state.isDragging) return;
const minWidth = 1;
const maxWidth = window.innerWidth - 13;
const newSize = Math.min(maxWidth, Math.max(minWidth, e.pageX));
this.setState({
size : e.pageX
size : newSize
});
},
/*

View File

@@ -28,5 +28,8 @@
color : #666;
}
}
&:hover{
background-color: #999;
}
}
}