@AntonKhorev commented on this pull request.
> + modeGroup.html("");
+ for (const mode of new Set(modes)) {
+ modeGroup.append(`<input type="radio" class="btn-check" name="modes"
id="${mode}" autocomplete="off">`);
+ modeGroup.append(`<label class="btn btn-outline-secondary px-2"
for="${mode}" title="${
+ I18n.t("javascripts.directions.modes." + mode)
+ }"><svg class="d-block" width="16" height="16" fill="currentColor"><path
d="${modeIconPaths[mode]}"></path></svg></label>`);
+ }
Are you sure you want to redraw the buttons instead of adding them once in the
html template? Even if you plan for routing engines that don't support every
mode, would you remove the mode button rather than disable it?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5652#pullrequestreview-2628719625
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5652/review/2628719...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev