From ef1193b66dd7c427200c7a585c4ead0043e32975 Mon Sep 17 00:00:00 2001 From: Alexandre Demers Date: Wed, 21 Nov 2018 11:29:52 -0500 Subject: [PATCH 1/2] Fix bottombar's visibility The text element just under the schedule's SVG was partially hidden when the bottombar's height was set to 175px. I tried to remove the height property or to set it to auto. This was working great under Chrome, but Firefox seems to have problem calculating the content element's height... unless the debug pane was opened (???) So, for now, fix the height by setting a proper value (198px). Fix a comment at the same time for readability. Signed-off-by: Alexandre Demers --- gtfsscheduleviewer/files/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfsscheduleviewer/files/index.js b/gtfsscheduleviewer/files/index.js index 338f1572..25fd65dc 100644 --- a/gtfsscheduleviewer/files/index.js +++ b/gtfsscheduleviewer/files/index.js @@ -605,7 +605,7 @@ function callbackDisplayTripRows(data, responseCode, tripId) { html += svgTag("/ttablegraph?height=100&trip=" + encodeURIComponent(tripId), "height='115' width='100%'"); var bottombarDiv = document.getElementById("bottombar"); bottombarDiv.style.display = "block"; - bottombarDiv.style.height = "175px"; + bottombarDiv.style.height = "198px"; bottombarDiv.innerHTML = html; sizeRouteList(); } @@ -670,7 +670,7 @@ function sizeRouteList() { var height = windowHeight() - document.getElementById('topbar').offsetHeight - 15 - bottombarHeight; document.getElementById('content').style.height = height + 'px'; if (map) { - // Without this displayPolyLine does not use the correct map size + // Without this, displayPolyLine does not use the correct map size //map.checkResize(); } } From 38a486bc4f8302aaafd4d815ad0f9974b279910e Mon Sep 17 00:00:00 2001 From: Alexandre Demers Date: Wed, 21 Nov 2018 13:06:53 -0500 Subject: [PATCH 2/2] Fix Date input field to display date as yyyyMMdd The yyyy, MM and dd values were added one to the other under setStartDate(). 2018, 11, 21 would end up being 2050 instead of 20181121. Force the variables to be treated as strings. Signed-off-by: Alexandre Demers --- gtfsscheduleviewer/files/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfsscheduleviewer/files/index.js b/gtfsscheduleviewer/files/index.js index 25fd65dc..6a47bac6 100644 --- a/gtfsscheduleviewer/files/index.js +++ b/gtfsscheduleviewer/files/index.js @@ -686,7 +686,7 @@ function maybeAddLeadingZero(number) { } function setStartDate(y,m,d) { - document.getElementById('startDateInput').value = y + maybeAddLeadingZero(m) + maybeAddLeadingZero(d); + document.getElementById('startDateInput').value = y.toString() + maybeAddLeadingZero(m).toString() + maybeAddLeadingZero(d).toString(); } function downloadUrl(url, callback) {