Commit 16f0939
committed
fix(map): stop reprojecting routes on every pan frame
Both the index and route-detail maps bound adjustTrailStrokes to 'move',
reprojecting every route polyline vertex per frame. Pan doesn't change the
SVG scale or stroke width and Leaflet translates the renderer pane natively,
so the per-frame reprojection was wasted work that made touch panning crawl
when many routes were visible. Gate it on an actual zoom change; zoom
gestures still step zoom per frame, so constant stroke width is preserved.1 parent 3a74251 commit 16f0939
2 files changed
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5208 | 5208 | | |
5209 | 5209 | | |
5210 | 5210 | | |
| 5211 | + | |
| 5212 | + | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
| 5217 | + | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + | |
| 5221 | + | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
| 5225 | + | |
| 5226 | + | |
| 5227 | + | |
| 5228 | + | |
| 5229 | + | |
| 5230 | + | |
| 5231 | + | |
5211 | 5232 | | |
5212 | 5233 | | |
5213 | 5234 | | |
| |||
5595 | 5616 | | |
5596 | 5617 | | |
5597 | 5618 | | |
5598 | | - | |
5599 | | - | |
| 5619 | + | |
5600 | 5620 | | |
5601 | 5621 | | |
5602 | 5622 | | |
| |||
8810 | 8830 | | |
8811 | 8831 | | |
8812 | 8832 | | |
8813 | | - | |
8814 | | - | |
| 8833 | + | |
8815 | 8834 | | |
8816 | 8835 | | |
8817 | 8836 | | |
| |||
0 commit comments