style(board): hover arrow tip just past the square centre
public
style(board): hover arrow tip just past the square centre Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| Changeset | c02631b5642eb117b844cb4f33cb0d85e14c3f6d |
|---|---|
| Author (claimed) | Timo Stolz <timo.stolz@nullachtvierzehn.de>, |
| Parents | 6e7d3a949184 |
| Children | 489813b33743 |
| Pushlog | by timo via ssh by timo via ssh |
modified schach/diagram.py +3 −1
| @@ -378,7 +378,9 @@ class BoardPainter: | ||
| 378 | 378 | angle = math.atan2(y1 - y0, x1 - x0) |
| 379 | 379 | # mit Rand so schlank wie das Visier (Linie 0,07, Rand 0,02), sonst wie bei Lichess |
| 380 | 380 | shaft, head = (sq * 0.07, sq * 0.28) if outline else (sq * 0.13, sq * 0.38) |
| 381 | - tip_x, tip_y = x1 - math.cos(angle) * sq * 0.12, y1 - math.sin(angle) * sq * 0.12 | |
| 381 | + # mit Rand bis knapp über die Feldmitte: die Spitze sitzt im Visier, nicht auf seinem Rand | |
| 382 | + short = -sq * 0.06 if outline else sq * 0.12 | |
| 383 | + tip_x, tip_y = x1 - math.cos(angle) * short, y1 - math.sin(angle) * short | |
| 382 | 384 | base_x, base_y = tip_x - math.cos(angle) * head * 0.8, tip_y - math.sin(angle) * head * 0.8 |
| 383 | 385 | start_x, start_y = x0 + math.cos(angle) * sq * 0.2, y0 + math.sin(angle) * sq * 0.2 |
| 384 | 386 | passes = [((0, 0, 0, 0.35), sq * 0.02), ((*rgb, 1.0), 0)] if outline else [((*rgb, 0.8), 0)] |