@signal9/era-ui 1.10.3 → 1.10.4
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 +30 -26
- package/package.json +1 -1
|
@@ -93,7 +93,36 @@
|
|
|
93
93
|
// and are data-pane-control so they never start a pane drag.
|
|
94
94
|
type ResizeDir = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
95
95
|
const RESIZE_HANDLES: { dir: ResizeDir; cursor: string; place: string }[] = [
|
|
96
|
-
// corners
|
|
96
|
+
// edges FIRST so the corners (rendered after) paint on top of them and win
|
|
97
|
+
// the hit test where they overlap — a corner press always resizes
|
|
98
|
+
// diagonally, never along a single axis. n + w stay OUTSIDE only
|
|
99
|
+
// (translate ±100%); s + e straddle (translate ±50%) so the right and
|
|
100
|
+
// bottom also reach ~6px inward.
|
|
101
|
+
{
|
|
102
|
+
dir: 'n',
|
|
103
|
+
cursor: 'cursor-ns-resize',
|
|
104
|
+
place: 'top:0;left:0;right:0;translate:0 -100%;height:calc(var(--era-h-md)/4)'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
dir: 's',
|
|
108
|
+
cursor: 'cursor-ns-resize',
|
|
109
|
+
place: 'bottom:0;left:0;right:0;translate:0 50%;height:calc(var(--era-h-md)/2)'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
dir: 'w',
|
|
113
|
+
cursor: 'cursor-ew-resize',
|
|
114
|
+
place: 'left:0;top:0;bottom:0;translate:-100% 0;width:calc(var(--era-h-md)/4)'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
// Inset the top by the handle-bar height so its inward reach stays clear
|
|
118
|
+
// of the drag bar (keeping the whole bar draggable).
|
|
119
|
+
dir: 'e',
|
|
120
|
+
cursor: 'cursor-ew-resize',
|
|
121
|
+
place:
|
|
122
|
+
'right:0;top:var(--era-h-sm);bottom:0;translate:50% 0;width:calc(var(--era-h-md)/2)'
|
|
123
|
+
},
|
|
124
|
+
// corners LAST — a square at each corner (diagonal gap filler), painted
|
|
125
|
+
// above the edges so the red grab zone is always on top of the blue.
|
|
97
126
|
{
|
|
98
127
|
dir: 'nw',
|
|
99
128
|
cursor: 'cursor-nwse-resize',
|
|
@@ -119,31 +148,6 @@
|
|
|
119
148
|
cursor: 'cursor-nwse-resize',
|
|
120
149
|
place:
|
|
121
150
|
'bottom:0;right:0;translate:50% 50%;width:calc(var(--era-h-md)/2);height:calc(var(--era-h-md)/2)'
|
|
122
|
-
},
|
|
123
|
-
// edges. n + w stay OUTSIDE only (translate ±100%); s + e straddle
|
|
124
|
-
// (translate ±50%) so the right and bottom also reach ~6px inward.
|
|
125
|
-
{
|
|
126
|
-
dir: 'n',
|
|
127
|
-
cursor: 'cursor-ns-resize',
|
|
128
|
-
place: 'top:0;left:0;right:0;translate:0 -100%;height:calc(var(--era-h-md)/4)'
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
dir: 's',
|
|
132
|
-
cursor: 'cursor-ns-resize',
|
|
133
|
-
place: 'bottom:0;left:0;right:0;translate:0 50%;height:calc(var(--era-h-md)/2)'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
dir: 'w',
|
|
137
|
-
cursor: 'cursor-ew-resize',
|
|
138
|
-
place: 'left:0;top:0;bottom:0;translate:-100% 0;width:calc(var(--era-h-md)/4)'
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
// Inset the top by the handle-bar height so its inward reach stays clear
|
|
142
|
-
// of the drag bar (keeping the whole bar draggable).
|
|
143
|
-
dir: 'e',
|
|
144
|
-
cursor: 'cursor-ew-resize',
|
|
145
|
-
place:
|
|
146
|
-
'right:0;top:var(--era-h-sm);bottom:0;translate:50% 0;width:calc(var(--era-h-md)/2)'
|
|
147
151
|
}
|
|
148
152
|
];
|
|
149
153
|
|