Skip to content

Commit 1072453

Browse files
authored
Merge branch 'openstreetmap:master' into reshuffle-docs
2 parents 9fc0b3e + 6befcc9 commit 1072453

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1509
-823
lines changed

app/assets/images/share_button_icons/bluesky.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/assets/images/share_button_icons/email.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/assets/images/share_button_icons/facebook.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/assets/images/share_button_icons/linkedin.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/assets/images/share_button_icons/mastodon.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/assets/images/share_button_icons/share.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/assets/images/share_button_icons/telegram.svg

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/assets/images/share_button_icons/x.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/assets/javascripts/heatmap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $(document).on("turbo:frame-load", function () {
33
const weekInfo = getWeekInfo();
44
const maxPerDay = heatmap.data("max-per-day");
55
const weekdayLabels = heatmap.find("[data-weekday]");
6+
const monthLabelStartIndex = Math.min(...heatmap.find("[data-month]").get().map(l => l.dataset.month));
67
let weekColumn = 1;
78
let previousMonth = null;
89

@@ -24,7 +25,7 @@ $(document).on("turbo:frame-load", function () {
2425
weekColumn++;
2526
const currentMonth = getMonthOfThisWeek(date);
2627
if (previousMonth === null) {
27-
previousMonth = currentMonth;
28+
previousMonth = currentMonth + (Math.round((monthLabelStartIndex - currentMonth) / 12) * 12);
2829
heatmap.find(`[data-month]:has( ~ [data-month="${previousMonth}"])`).remove();
2930
heatmap.find("[data-month]").first().css("grid-column-start", 2);
3031
}

app/assets/javascripts/index/query.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ OSM.Query = function (map) {
171171
credentials: OSM.OVERPASS_CREDENTIALS ? "include" : "same-origin",
172172
signal: $section.data("ajax").signal
173173
})
174-
.then(response => response.json())
174+
.then(response => {
175+
if (response.ok) {
176+
return response.json();
177+
}
178+
throw new Error(response.statusText || response.status);
179+
})
175180
.then(function (results) {
176181
let elements = results.elements;
177182

0 commit comments

Comments
 (0)