Commit 476e6b0
authored
feat(superdoc): center comment and document anchor on sidebar click (#2466)
* feat(superdoc): center comment and document anchor on sidebar click
Target viewport center (38% from top) instead of the comment's current
screen position when clicking a sidebar comment card.
* refactor(superdoc): extract magic number into named constant
Extract 0.38 viewport ratio into COMMENT_FOCUS_VIEWPORT_RATIO for
readability and easier future adjustment.1 parent c54ad66 commit 476e6b0
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
| |||
0 commit comments