From dde6254d16710705db0f0cc1e94d4d952799cda0 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Fri, 27 Oct 2023 11:56:02 -0400 Subject: [PATCH] Fix: set step any for float input with decimals Useful for latitudes and longitudes. --- umap/static/umap/js/umap.features.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index 2cbee193..91df595d 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -478,8 +478,7 @@ L.U.FeatureMixin = { filter = filter.toLowerCase() for (let i = 0, value; i < keys.length; i++) { value = (this.properties[keys[i]] || '') + '' - if (value.toLowerCase().indexOf(filter) !== -1) - return true + if (value.toLowerCase().indexOf(filter) !== -1) return true } return false }, @@ -669,8 +668,8 @@ L.U.Marker = L.Marker.extend({ appendEditFieldsets: function (container) { L.U.FeatureMixin.appendEditFieldsets.call(this, container) const coordinatesOptions = [ - ['_latlng.lat', { handler: 'FloatInput', label: L._('Latitude') }], - ['_latlng.lng', { handler: 'FloatInput', label: L._('Longitude') }], + ['_latlng.lat', { handler: 'FloatInput', label: L._('Latitude'), step: 'any' }], + ['_latlng.lng', { handler: 'FloatInput', label: L._('Longitude'), step: 'any' }], ] const builder = new L.U.FormBuilder(this, coordinatesOptions, { callback: function () {