Skip to content

Commit

Permalink
Stations name on hover + loading gif closing when no results
Browse files Browse the repository at this point in the history
  • Loading branch information
julianrojas87 committed Oct 4, 2019
1 parent 1fe4957 commit 0aeeb3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
8 changes: 7 additions & 1 deletion docs/js/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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++;
Expand All @@ -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";
Expand Down

0 comments on commit 0aeeb3b

Please sign in to comment.