Fix: set step any for float input with decimals

Useful for latitudes and longitudes.
This commit is contained in:
David Larlet 2023-10-27 11:56:02 -04:00
parent 67d89874e8
commit dde6254d16
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -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 () {