mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-20 03:38:17 +02:00
Bugfix/split line (#66)
* Issue:62,fix Split line should have max squeeze limit * added limit to right pane also
This commit is contained in:
parent
62ed489847
commit
e16650d4a7
@ -16,6 +16,7 @@ import NetworkError from 'components/ResponsePane/NetworkError';
|
|||||||
import StyledWrapper from './StyledWrapper';
|
import StyledWrapper from './StyledWrapper';
|
||||||
|
|
||||||
const MIN_LEFT_PANE_WIDTH = 300;
|
const MIN_LEFT_PANE_WIDTH = 300;
|
||||||
|
const MIN_RIGHT_PANE_WIDTH = 350;
|
||||||
const DEFAULT_PADDING = 5;
|
const DEFAULT_PADDING = 5;
|
||||||
|
|
||||||
const RequestTabPanel = () => {
|
const RequestTabPanel = () => {
|
||||||
@ -46,7 +47,11 @@ const RequestTabPanel = () => {
|
|||||||
const handleMouseMove = (e) => {
|
const handleMouseMove = (e) => {
|
||||||
if (dragging) {
|
if (dragging) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setLeftPaneWidth(Math.max((e.clientX - asideWidth - DEFAULT_PADDING), MIN_LEFT_PANE_WIDTH));
|
let leftPaneXPosition = e.clientX + 2;
|
||||||
|
if (leftPaneXPosition < (asideWidth+ DEFAULT_PADDING + MIN_LEFT_PANE_WIDTH) || leftPaneXPosition > (screenWidth - MIN_RIGHT_PANE_WIDTH )) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setLeftPaneWidth(leftPaneXPosition- asideWidth);
|
||||||
setRightPaneWidth(screenWidth - e.clientX - DEFAULT_PADDING);
|
setRightPaneWidth(screenWidth - e.clientX - DEFAULT_PADDING);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user