Commit bef73fc
committed
Fix: Add race condition protection and disable chart animations
Per code review feedback, adds two important improvements:
1. Race condition protection:
- Track elevation update sequence number
- Ignore stale data from late-returning API calls
- Prevents chart showing outdated elevation when waypoints dragged rapidly
2. Disable chart animations during updates:
- Use chart.update('none') instead of chart.update()
- Improves performance during drag operations
- Prevents animation queueing and visual lag
These fixes ensure the chart always shows current data and responds
smoothly even with rapid waypoint dragging or slow network connections.1 parent f0a1ffd commit bef73fc
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4231 | 4231 | | |
4232 | 4232 | | |
4233 | 4233 | | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
4234 | 4237 | | |
4235 | 4238 | | |
4236 | 4239 | | |
| |||
4307 | 4310 | | |
4308 | 4311 | | |
4309 | 4312 | | |
| 4313 | + | |
| 4314 | + | |
| 4315 | + | |
4310 | 4316 | | |
4311 | 4317 | | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
4312 | 4324 | | |
4313 | 4325 | | |
4314 | 4326 | | |
| |||
4364 | 4376 | | |
4365 | 4377 | | |
4366 | 4378 | | |
4367 | | - | |
4368 | | - | |
| 4379 | + | |
| 4380 | + | |
4369 | 4381 | | |
4370 | 4382 | | |
4371 | 4383 | | |
| |||
0 commit comments