feat: add hidden input for geolocation diameter

This commit is contained in:
log101 2024-08-06 16:32:46 +03:00
parent f1e16e8c74
commit 1431aab04a
2 changed files with 13 additions and 0 deletions

View File

@ -85,6 +85,11 @@ const backendUrl = import.meta.env.PUBLIC_BACKEND_URL
</p> </p>
</div> </div>
<input name='geolocation' id='geolocation-input' hidden /> <input name='geolocation' id='geolocation-input' hidden />
<input
name='geolocation-diameter'
id='geolocation-diameter-input'
hidden
/>
</div> </div>
<div> <div>

View File

@ -167,6 +167,10 @@ const DiameterControl = L.Control.extend({
targetLocationCircle.setRadius(targetLocationCircleRadius) targetLocationCircle.setRadius(targetLocationCircleRadius)
diameterText.innerText = `${targetLocationCircleRadius.toString()}m` diameterText.innerText = `${targetLocationCircleRadius.toString()}m`
updateInputValue(
"geolocation-diameter-input",
targetLocationCircleRadius.toString()
)
L.DomEvent.stop(ev) L.DomEvent.stop(ev)
}) })
@ -181,6 +185,10 @@ const DiameterControl = L.Control.extend({
) )
targetLocationCircle.setRadius(targetLocationCircleRadius) targetLocationCircle.setRadius(targetLocationCircleRadius)
diameterText.innerText = `${targetLocationCircleRadius.toString()}m` diameterText.innerText = `${targetLocationCircleRadius.toString()}m`
updateInputValue(
"geolocation-diameter-input",
targetLocationCircleRadius.toString()
)
L.DomEvent.stop(ev) L.DomEvent.stop(ev)
}) })