Commit 02dd194
committed
fix(plugin-scroll): horizontal layout extent, centering and programmatic scroll
BREAKING CHANGE: none
- Use scroll-axis extent (width vs height) for visible range and end spacing
so horizontal mode no longer treats item height as the scroll extent.
- Disable horizontal centering (getCenteringOffsetX → 0) so pages stay in a
plain row; vertical keeps centering via total content width.
- During pageChangeState.isChanging, keep store currentPage from viewport-
derived metrics and avoid duplicate pageChange$ until user-driven scroll
resumes; startPageChange sets currentPage + emits pageChange$ optimistically.
- In commitMetrics, dispatch before scroll$.emit so listeners that read state
see metricsToCommit (single source of truth).
- Set PageLayout.elevated: false when building virtual items (required field;
selectors still override from interaction manager).1 parent aa45d6e commit 02dd194
4 files changed
Lines changed: 79 additions & 29 deletions
File tree
- packages/plugin-scroll/src/lib
- strategies
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
439 | 450 | | |
440 | 451 | | |
441 | 452 | | |
| |||
494 | 505 | | |
495 | 506 | | |
496 | 507 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
505 | 524 | | |
506 | 525 | | |
507 | 526 | | |
| |||
Lines changed: 29 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| |||
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| 63 | + | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
50 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
51 | 71 | | |
52 | 72 | | |
53 | 73 | | |
| |||
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
78 | | - | |
| 98 | + | |
79 | 99 | | |
80 | 100 | | |
81 | 101 | | |
| |||
85 | 105 | | |
86 | 106 | | |
87 | 107 | | |
| 108 | + | |
| 109 | + | |
88 | 110 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
| |||
107 | 127 | | |
108 | 128 | | |
109 | 129 | | |
110 | | - | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | | - | |
114 | | - | |
115 | 133 | | |
116 | 134 | | |
117 | | - | |
118 | | - | |
| 135 | + | |
119 | 136 | | |
120 | 137 | | |
121 | 138 | | |
| |||
194 | 211 | | |
195 | 212 | | |
196 | 213 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 214 | + | |
205 | 215 | | |
206 | 216 | | |
207 | 217 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
0 commit comments