Repository navigation
Commit 31aab0e
committed
refactor(line-selection): extract dx/dy, fix actual 1 px gap
Reviewer-spotted (gemini-code-assist on PR #51):
- Hoist dispX2-dispX1 / dispY2-dispY1 into dx, dy locals; less
repetition in the perpendicular-vector math.
- Offset was lineStrokeWidth / 2 + 1, which puts the selection stroke
*centre* 1 px past the body's edge. With a 1 px-wide selection
stroke that leaves an actual visual gap of only 0.5 px between the
edges. Bump to +1.5 so the gap matches the comment.1 parent 91a6ab5 commit 31aab0e
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
226 | 236 | | |
227 | | - | |
228 | | - | |
229 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
230 | 240 | | |
231 | 241 | | |
232 | 242 | | |
| |||
0 commit comments