diff --git a/docs/css/style.css b/docs/css/style.css index 62aff3ad..fdec3144 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -5,8 +5,11 @@ html, body { } #optionsBar { - margin-bottom: 5px; - text-align: center + position: absolute; + text-align: center; + width: 100%; + background-color: white; + z-index: 900; } #optionsBar .optionLabel { @@ -201,4 +204,8 @@ input:checked+.slider:before { left: 89%; top: 80%; width: 9%; +} + +.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { + top: 25px; } \ No newline at end of file diff --git a/docs/js/example.js b/docs/js/example.js index 8adda8c8..1d59374f 100644 --- a/docs/js/example.js +++ b/docs/js/example.js @@ -122,6 +122,12 @@ planner.getAllStops().then(stops => { allStops.push(marker); + marker.on('mouseover', e => { + marker.openPopup(); + }); + marker.on('mouseout', e => { + marker.closePopup(); + }); marker.on("click", e => { selectRoute(e, stop.id); }); @@ -498,7 +504,6 @@ function runQuery(query) { console.error(error); }) .on("data", async path => { - document.getElementById('loading').style.display = 'none'; const completePath = await planner.completePath(path); console.log('Path', completePath); i++; @@ -508,6 +513,7 @@ function runQuery(query) { }) .on("end", () => { + document.getElementById('loading').style.display = 'none'; if (i < amount) { const noMore = document.createElement("div"); noMore.className = "path";