Skip to content

Commit

Permalink
add gesture handling
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinorg committed Jan 7, 2025
1 parent 467c175 commit f5d8eff
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions freezing/web/static/css/leaflet-gesture-handling.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions freezing/web/static/js/leaflet-gesture-handling.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion freezing/web/static/js/ride-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const track_colors = [
'rgb(212, 44, 252)', 'rgb(234, 10, 218)', 'rgb(252, 0, 179)', 'rgb(255, 0, 136)', 'rgb(255, 0, 87)',
];
function create_ride_map(id, url, ride_color = null, recenter = false) {
const map = L.map(id, { scrollWheelZoom: false }).setView([38.9072, -77.0369], 9);
const map = L.map(id, { gestureHandling: true }).setView([38.9072, -77.0369], 9);
const colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
var tiles = L.tileLayer('https://{s}.basemaps.cartocdn.com/' + colorMode + '_all/{z}/{x}/{y}{r}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>',
Expand Down
Loading

0 comments on commit f5d8eff

Please sign in to comment.