From 008a996bead798f2a0da634527b2173f4f2efcd6 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 11 Feb 2025 14:00:09 +0100 Subject: [PATCH] feat: make vertex icons bigger (and round) --- umap/static/umap/js/umap.controls.js | 5 +++++ umap/static/umap/map.css | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 2edf3dce..c2afcc3e 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -887,4 +887,9 @@ U.Editable = L.Editable.extend({ }) this.stopDrawing() }, + + createVertexIcon: (options) => + L.Browser.mobile && L.Browser.touch + ? L.divIcon({ iconSize: new L.Point(20, 20), ...options }) + : L.divIcon({ iconSize: new L.Point(12, 12), ...options }), }) diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index ee13aa31..51191d40 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -379,7 +379,10 @@ ul.photon-autocomplete { .umap-edit-enabled .umap-toolbar a { display: block; } - +.leaflet-middle-icon, +.leaflet-vertex-icon { + border-radius: 50%; +} /* ********************************* */ /* Third party plugin override */