0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 06:33:32 +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){ handleMove : function(e){
if(!this.state.isDragging) return; 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({ this.setState({
size : e.pageX size : newSize
}); });
}, },
/* /*

View File

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