auto-sync: 2026-05-13 19:10:01

This commit is contained in:
Stream
2026-05-13 19:10:01 +03:00
parent 3e5003bec2
commit 769e09865e
2 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import sys
path = "/home/slin/enduro-trails/prototype/static/app.js"
with open(path, 'r') as f:
content = f.read()
# Add restoreTerrainState and restoreTrailsState to rebuildMapOverlays
old = """function rebuildMapOverlays() {
// Re-apply recon circle if active
if (reconMode && reconCenter) {"""
new = """function rebuildMapOverlays() {
// Re-apply terrain and trails after style change
restoreTerrainState();
restoreTrailsState();
// Re-apply recon circle if active
if (reconMode && reconCenter) {"""
if old not in content:
print("ERROR: marker not found")
sys.exit(1)
content = content.replace(old, new)
with open(path, 'w') as f:
f.write(content)
print("OK - rebuildMapOverlays patched")