Commit graph

486 commits

Author SHA1 Message Date
Anton Khorev
1e9603c7b1 Remove endpoint/input values on disable 2024-08-21 11:43:26 +03:00
Anton Khorev
a088b136fb Read lat/lon attributes when generating context menu directions urls 2024-08-20 14:55:29 +03:00
Anton Khorev
4f3576e91b Save lat/lon to input data attributes 2024-08-20 14:55:29 +03:00
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
93a9f31bf0 Show/hide "Where is this?" when setting search value from directions 2024-08-19 20:05:48 +03:00
Tom Hughes
41b81bd393 Merge remote-tracking branch 'upstream/pull/5083' 2024-08-18 12:16:22 +01:00
Anton Khorev
80c43f51c2 Copy "From" endpoint value to search input when closing directions 2024-08-16 18:48:05 +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
e0df084e57 Don't call endpoint.setLatLng() from outside of endpoint module 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
Anton Khorev
567a9e5b23 Rename route request variable
It's not boolean, the comment was outdated.
2024-08-10 06:01:35 +03:00
Anton Khorev
d065f88b1a Remove references to global variables from endpoint drag listener
This causes visible input value updates even when the route is not recalculated. The upside is that it lets endpoints not know about the route and its update state.
2024-08-10 05:53:59 +03:00
Anton Khorev
0e3f0fbfd4 Set search input value to 'lat, lon' params if query param is missing 2024-07-17 16:43:52 +03:00
Tom Hughes
26f6fdf82c Merge remote-tracking branch 'upstream/pull/4929' 2024-07-14 15:56:20 +01:00
Anton Khorev
0d2010cd2f Remove "whereami" search parameter, use "lat" and "lon" instead 2024-07-06 16:56:49 +03:00
Anton Khorev
51d2a846ec Rename map layer javascript files 2024-06-28 03:12:15 +03:00
Anton Khorev
b5070d97a9 Introduce geocode event callback for route endpoints
Removes remaining getRoute() call from endpoint objects.
2024-06-15 22:26:23 +03:00
Anton Khorev
d3ab0c9a8a Introduce drag event callback for route endpoints
Avoids calling getRoute() from within endpoint objects.
2024-06-15 21:51:48 +03:00
Tom Hughes
84aa7f455a Merge remote-tracking branch 'upstream/pull/4897' 2024-06-14 18:02:50 +01:00
Anton Khorev
6c3c4f2751 Use .is-invalid to highlight routing inputs with failed geocode lookups 2024-06-14 19:42:45 +03:00
Anton Khorev
5944feb008 Remove global "awaiting geocode" routing state 2024-06-14 19:14:49 +03:00
Anton Khorev
dc134f3897 Show u-turn icons for GraphHopper u-turn instructions 2024-06-12 17:34:41 +03:00
Anton Khorev
2cd1b2e64a Show fork icons for GraphHopper keep right/left instructions 2024-06-12 17:31:02 +03:00
Anton Khorev
16d355f2b7 Redraw routing sprites 2024-06-08 19:44:24 +03:00
Anton Khorev
12281b1cc1 Fix setting "From" in directions form based on search query 2024-06-04 15:49:56 +03:00
Tom Hughes
691289bfc0 Merge remote-tracking branch 'upstream/pull/4871' 2024-06-04 10:38:20 +01:00
Anton Khorev
060494b09c Use button elements that allow word wrap for note controls 2024-06-03 13:40:11 +03:00
Anton Khorev
6ae4e53f45 Use flex in routing form to fix marker column width 2024-06-03 12:21:11 +03:00
Anton Khorev
bdac47c52e Remove custom css from "Load Data" button 2024-05-26 04:51:42 +03:00
Tom Hughes
161fc8ac47 Replace deprecated text-muted class with text-body-secondary 2024-05-22 11:58:32 +01:00
Tom Hughes
a5f7221639 Merge remote-tracking branch 'upstream/pull/4728' 2024-04-27 15:19:45 +01:00
Tom Hughes
b3cb9e2524 Merge remote-tracking branch 'upstream/pull/4725' 2024-04-27 15:16:19 +01:00
Anton Khorev
039a7d6af7 Stretch query result links, listen to their over/out events, don't simulate clicks 2024-04-27 06:58:59 +03:00
Anton Khorev
63aaf045ac Remove action item class from non-action query results 2024-04-27 06:57:20 +03:00
Anton Khorev
ec91b3a39f Remove simulating clicks on <a> when <li> is clicked
The simulation is not required because the link is stretched.
2024-04-27 05:08:31 +03:00
Anton Khorev
adabb735fc Use Bootstrap actionable items in search results lists 2024-04-27 04:17:04 +03:00
Anton Khorev
0bd034a8e9 Use Bootstrap actionable items in query results 2024-04-24 03:44:35 +03:00
Anton Khorev
48fc453dd0 Use Bootstrap hoverable rows in directions tables 2024-04-15 18:52:19 +03:00
Anton Khorev
2d03d738da Scroll to api error message 2024-02-12 01:27:12 +03:00
Anton Khorev
ef919179fa Show api error message if failed to (un)subscribe 2024-02-12 01:27:12 +03:00
Anton Khorev
55bb243731 Turn hide/unhide comment controls into buttons 2024-02-12 01:27:12 +03:00
Anton Khorev
d1b58fb20e Show blocked api response when reopening notes 2024-01-17 02:15:14 +03:00