This repository was archived by the owner on Jan 30, 2026. It is now read-only.
Commit 09e82ee
authored
feat: implement viewport clamping for menu positioning in SuperDocTemplateBuilder (#10)
This commit adds a new utility function, clampToViewport, to ensure that the menu is positioned within the visible area of the viewport. The function adjusts the menu's coordinates based on predefined padding and approximate dimensions, enhancing the user experience by preventing overflow.1 parent 94b12b1 commit 09e82ee
1 file changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
100 | 120 | | |
101 | 121 | | |
102 | 122 | | |
| |||
385 | 405 | | |
386 | 406 | | |
387 | 407 | | |
388 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
389 | 411 | | |
390 | 412 | | |
391 | 413 | | |
| |||
435 | 457 | | |
436 | 458 | | |
437 | 459 | | |
438 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
439 | 463 | | |
440 | 464 | | |
441 | 465 | | |
| |||
0 commit comments