Commit a57108a
committed
Refactor resize system to use edge/corner zones
Replace single bottom-right resizer with 8 invisible resize zones along
all edges and corners (n, s, e, w, ne, nw, se, sw). Window can now be
resized from any direction.
Changes:
- Add ResizeDirection type and resizeDirection state
- Add startX/startY to DragState for proper delta calculations
- Update DEFAULT_WINDOW_TEMPLATE with 8 resize zone divs
- Update DEFAULT_STYLES to position resize zones and use flexbox layout
- Refactor initDragAndResize() to setup handlers for all directions
- Add handleDirectionalResize() method for directional resize logic
- Update updateDockedResizerCursor() to show/hide zones based on dock state
- Update documentation and demo to reflect new resize behavior1 parent eaa2611 commit a57108a
File tree
7 files changed
+203
-140
lines changed- demo
- docs
- src
7 files changed
+203
-140
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
| 282 | + | |
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
| |||
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
156 | | - | |
157 | | - | |
158 | 155 | | |
159 | 156 | | |
| 157 | + | |
| 158 | + | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 183 | | |
| 184 | + | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
| |||
205 | 202 | | |
206 | 203 | | |
207 | 204 | | |
| 205 | + | |
| 206 | + | |
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 223 | + | |
| 224 | + | |
239 | 225 | | |
240 | 226 | | |
241 | 227 | | |
242 | 228 | | |
| 229 | + | |
243 | 230 | | |
244 | 231 | | |
245 | 232 | | |
| |||
307 | 294 | | |
308 | 295 | | |
309 | 296 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 297 | + | |
313 | 298 | | |
314 | 299 | | |
315 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments