3hstack commited on
Commit
611fdac
·
verified ·
1 Parent(s): 5a58093

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -384,7 +384,7 @@ PAGE = r'''<!DOCTYPE html>
384
  @keyframes s{to{transform:rotate(360deg)}}
385
  .truck{filter:drop-shadow(0 2px 5px rgba(0,0,0,.7))}
386
  .arrow{pointer-events:none}
387
- .dimbase{filter:brightness(.62) saturate(.7)}
388
  </style>
389
  </head>
390
  <body>
@@ -482,7 +482,7 @@ function showShot(f){
482
  const map = L.map('map').setView([39.83, -98.58], 4);
483
  const streets = L.tileLayer(
484
  'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png',
485
- {maxZoom:19, attribution:'&copy; OpenStreetMap, &copy; CARTO', className:'dimbase'});
486
  const satellite = L.tileLayer(
487
  'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
488
  {maxZoom:19, maxNativeZoom:19, attribution:'Imagery &copy; Esri'});
@@ -531,6 +531,7 @@ document.getElementById('clear').onclick = () => {
531
  [routeLayer, trailLine, arrowLayer, truck, startMarker].forEach(l => l && map.removeLayer(l));
532
  routeLayer = trailLine = arrowLayer = truck = startMarker = shape = null;
533
  document.getElementById('solve').disabled = true;
 
534
  document.getElementById('play').classList.remove('on');
535
  document.getElementById('hud').classList.remove('on');
536
  document.getElementById('legend').style.display = 'none';
@@ -657,6 +658,7 @@ function render(d){
657
  const bb = L.latLngBounds([]); PATH.forEach(s => { bb.extend(s.oa); bb.extend(s.ob); });
658
  map.fitBounds(bb, {padding:[28,28]});
659
  buildLegend();
 
660
  document.getElementById('play').classList.add('on');
661
  document.getElementById('hud').classList.add('on');
662
  renderStats(d.stats);
 
384
  @keyframes s{to{transform:rotate(360deg)}}
385
  .truck{filter:drop-shadow(0 2px 5px rgba(0,0,0,.7))}
386
  .arrow{pointer-events:none}
387
+ #map.routed .leaflet-tile-pane{filter:brightness(.72) saturate(.85)}
388
  </style>
389
  </head>
390
  <body>
 
482
  const map = L.map('map').setView([39.83, -98.58], 4);
483
  const streets = L.tileLayer(
484
  'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png',
485
+ {maxZoom:19, attribution:'&copy; OpenStreetMap, &copy; CARTO'});
486
  const satellite = L.tileLayer(
487
  'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
488
  {maxZoom:19, maxNativeZoom:19, attribution:'Imagery &copy; Esri'});
 
531
  [routeLayer, trailLine, arrowLayer, truck, startMarker].forEach(l => l && map.removeLayer(l));
532
  routeLayer = trailLine = arrowLayer = truck = startMarker = shape = null;
533
  document.getElementById('solve').disabled = true;
534
+ document.getElementById('map').classList.remove('routed');
535
  document.getElementById('play').classList.remove('on');
536
  document.getElementById('hud').classList.remove('on');
537
  document.getElementById('legend').style.display = 'none';
 
658
  const bb = L.latLngBounds([]); PATH.forEach(s => { bb.extend(s.oa); bb.extend(s.ob); });
659
  map.fitBounds(bb, {padding:[28,28]});
660
  buildLegend();
661
+ document.getElementById('map').classList.add('routed');
662
  document.getElementById('play').classList.add('on');
663
  document.getElementById('hud').classList.add('on');
664
  renderStats(d.stats);