mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Rename `Draggable` as `ResizingAnchor` since that is what it is used for and shouldn't be mistaken as a general draggable item * Refactor `ResizingAnchor` to be much more smart about how it handles mouse movements. Allow it to know which direction the resizing should be in allowing it to produce exact resized values. * Add event handlers for the min and max extents so that actions can be triggered when those extents are passed (in either direction) * Add double click support Signed-off-by: Sebastian Malton <sebastian@malton.name>
47 lines
615 B
SCSS
47 lines
615 B
SCSS
body.resizing {
|
|
user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
.ResizingAnchor {
|
|
$dimension: 12px;
|
|
|
|
position: absolute;
|
|
z-index: 10;
|
|
|
|
&.disabled {
|
|
display: none;
|
|
}
|
|
|
|
&.vertical {
|
|
left: 0;
|
|
right: 0;
|
|
cursor: row-resize;
|
|
height: $dimension;
|
|
|
|
&.leading {
|
|
top: -$dimension / 2;
|
|
}
|
|
|
|
&.trailing {
|
|
bottom: -$dimension / 2;
|
|
}
|
|
}
|
|
|
|
&.horizontal {
|
|
top: 0;
|
|
bottom: 0;
|
|
cursor: col-resize;
|
|
width: $dimension;
|
|
|
|
&.leading {
|
|
left: -$dimension / 2;
|
|
}
|
|
|
|
&.trailing {
|
|
right: -$dimension / 2;
|
|
}
|
|
}
|
|
}
|