@signal9/era-ui 1.11.2 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/pane/pane-root.svelte +15 -12
- package/package.json +1 -1
|
@@ -87,11 +87,13 @@
|
|
|
87
87
|
// Resize handles. Every strip protrudes xs-inset-sm (= sp/2, the same inset
|
|
88
88
|
// that gaps the close button from the pane edge) OUTSIDE the pane. n + w are
|
|
89
89
|
// that thin outward-only. s + e straddle (translate ±50%, double thickness)
|
|
90
|
-
// so they also reach xs-inset-sm INWARD — on the right,
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
90
|
+
// so they also reach xs-inset-sm INWARD — on the right, into the close-button
|
|
91
|
+
// gap. Corners are h-md/2 squares straddling each corner; each reaches h-md/4
|
|
92
|
+
// along both edges, so the edges are inset by that at both ends and stop right
|
|
93
|
+
// where a corner begins instead of running under it. `dir` is any of n/s/e/w;
|
|
94
|
+
// a 2-letter dir is a corner. Handles live in a layer aligned to the pane's
|
|
95
|
+
// border box (markup) and are data-pane-control so they never start a pane
|
|
96
|
+
// drag.
|
|
95
97
|
type ResizeDir = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
96
98
|
const RESIZE_HANDLES: { dir: ResizeDir; cursor: string; place: string }[] = [
|
|
97
99
|
// edges FIRST so the corners (rendered after) paint on top of them and win
|
|
@@ -102,25 +104,26 @@
|
|
|
102
104
|
{
|
|
103
105
|
dir: 'n',
|
|
104
106
|
cursor: 'cursor-ns-resize',
|
|
105
|
-
place:
|
|
107
|
+
place:
|
|
108
|
+
'top:0;left:calc(var(--era-h-md)/4);right:calc(var(--era-h-md)/4);translate:0 -100%;height:var(--era-xs-inset-sm)'
|
|
106
109
|
},
|
|
107
110
|
{
|
|
108
111
|
dir: 's',
|
|
109
112
|
cursor: 'cursor-ns-resize',
|
|
110
|
-
place:
|
|
113
|
+
place:
|
|
114
|
+
'bottom:0;left:calc(var(--era-h-md)/4);right:calc(var(--era-h-md)/4);translate:0 50%;height:calc(var(--era-xs-inset-sm)*2)'
|
|
111
115
|
},
|
|
112
116
|
{
|
|
113
117
|
dir: 'w',
|
|
114
118
|
cursor: 'cursor-ew-resize',
|
|
115
|
-
place:
|
|
119
|
+
place:
|
|
120
|
+
'left:0;top:calc(var(--era-h-md)/4);bottom:calc(var(--era-h-md)/4);translate:-100% 0;width:var(--era-xs-inset-sm)'
|
|
116
121
|
},
|
|
117
122
|
{
|
|
118
|
-
// Rises to top:0 (no inset) so its inward half overlays the close-button
|
|
119
|
-
// row — reaching exactly the button's edge, filling the gap on the left
|
|
120
|
-
// of the pane edge without covering the button.
|
|
121
123
|
dir: 'e',
|
|
122
124
|
cursor: 'cursor-ew-resize',
|
|
123
|
-
place:
|
|
125
|
+
place:
|
|
126
|
+
'right:0;top:calc(var(--era-h-md)/4);bottom:calc(var(--era-h-md)/4);translate:50% 0;width:calc(var(--era-xs-inset-sm)*2)'
|
|
124
127
|
},
|
|
125
128
|
// corners LAST — a square at each corner (diagonal gap filler), painted
|
|
126
129
|
// above the edges so the red grab zone is always on top of the blue.
|