[openstreetmap/openstreetmap-website] Group map controls explicitly (PR #3704)

Anton Khorev notifications at github.com
Mon Sep 19 16:30:22 UTC 2022


Avoid setting borders on specific map controls in css.

Why do  `.control-locate`, `.control-key` etc have their borders/margins altered in css? Because they are first or last buttons in groups, but this is not obvious from looking at css only. Here this is replaced by the code that actually groups controls. Now it's possible to add/regroup/remove controls in index.js without having to set their borders and margins manually.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3704

-- Commit Summary --

  * Create osm-specific locate control class
  * Group map controls
  * Set borders and spacing for control groups directly in js
  * Specify border/spacing values in stylesheet

-- File Changes --

    M app/assets/javascripts/index.js (99)
    A app/assets/javascripts/leaflet.locate.js (26)
    M app/assets/stylesheets/common.scss (28)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3704.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3704.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3704
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3704 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220919/9fbbedbf/attachment.htm>


More information about the rails-dev mailing list