Commit graph

11 commits

Author SHA1 Message Date
Anton Khorev
b4925d7b0d Limit coordinate precision in drag listener 2024-08-20 14:55:29 +03:00
Anton Khorev
5a1e3e5c67 Replace geocode request boolean property with request object 2024-08-19 20:30:51 +03:00
Anton Khorev
a8838b3727 Remove endpoint markers in disable method 2024-08-19 20:30:51 +03:00
Anton Khorev
64da05f8ff Install endpoint listeners using enable/disable methods 2024-08-19 20:30:51 +03:00
Anton Khorev
89a35fe11f Make getGeocode a private function 2024-08-16 08:57:39 +03:00
Anton Khorev
51cbbe6d5a Move empty value check out of endpoint.getGeocode 2024-08-16 08:54:23 +03:00
Anton Khorev
e624871eb4 Remove endpoint.hasGeocode state and related getRoute code
hasGeocode didn't actually indicated if an endpoint has a value acquired from a geocoder. It was set to true when at least one call to a geocoder finished successfully, including getting an empty result. getRoute doesn't need to know what calls were made, it only needs coordinates. It also doesn't get to decide when to fetch coordinates, this is done in drag/change callbacks.
2024-08-16 08:53:34 +03:00
Anton Khorev
ec6789920c Rename geocodeCallback to changeCallback, call it from latlon setValue
endpoint.setValue always calls changeCallback on its successful completion, with geocoding or without. This allows to decide when to call getRoute entirely from callbacks and event listeners.
2024-08-15 12:00:31 +03:00
Anton Khorev
f1ca64ff84 Make setLatLng a private function 2024-08-14 05:11:56 +03:00
Anton Khorev
f65593651f Don't set input value from endpoint.setLatLng()
This input value computed from coordinates is not always used. endpoint.getGeocode() overwrites it immediately.
2024-08-14 05:11:56 +03:00
Anton Khorev
415f497d89 Move endpoints code to its own module 2024-08-10 06:19:32 +03:00