Commit 8899093
committed
fix: Fix offset reset issue caused by floating-point precision at boundary positions
When the panel is already at a boundary position, floating-point precision
errors on some devices can cause unexpected offset resets in the position
calculation.
By applying floor() to the position calculations for top, left, bottom, and
right edges in FloatingPanelLayoutAnchor, we ensure integer values are
returned, preventing layout issues caused by floating-point precision errors.1 parent 9e8fd34 commit 8899093
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
0 commit comments