fix: accept long floats for latitude and longitude

Without "step: any", long floats are considered invalid.
This commit is contained in:
Alexis Métaireau 2023-12-16 15:19:23 +01:00
parent 625131f7df
commit 36a0e36c14

View file

@ -680,8 +680,26 @@ L.U.Marker = L.Marker.extend({
appendEditFieldsets: function (container) { appendEditFieldsets: function (container) {
L.U.FeatureMixin.appendEditFieldsets.call(this, container) L.U.FeatureMixin.appendEditFieldsets.call(this, container)
const coordinatesOptions = [ 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',
min: -90,
max: 90,
},
],
[
'_latlng.lng',
{
handler: 'FloatInput',
label: L._('Longitude'),
step: 'any',
min: -180,
max: 180,
},
],
] ]
const builder = new L.U.FormBuilder(this, coordinatesOptions, { const builder = new L.U.FormBuilder(this, coordinatesOptions, {
callback: function () { callback: function () {