Anton Khorev
b4925d7b0d
Limit coordinate precision in drag listener
2024-08-20 14:55:29 +03:00
Tom Hughes
99a7d21a9b
Merge remote-tracking branch 'upstream/pull/5095'
2024-08-19 19:05:44 +01:00
Anton Khorev
93a9f31bf0
Show/hide "Where is this?" when setting search value from directions
2024-08-19 20:05:48 +03:00
Anton Khorev
c9f495cb18
Remove endpoint markers in disable method
2024-08-19 19:39:53 +03:00
Anton Khorev
dad6bca753
Install endpoint listeners using enable/disable methods
2024-08-19 19:39:53 +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
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
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
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
6ae4e53f45
Use flex in routing form to fix marker column width
2024-06-03 12:21:11 +03:00
Tom Hughes
161fc8ac47
Replace deprecated text-muted class with text-body-secondary
2024-05-22 11:58:32 +01:00
Anton Khorev
48fc453dd0
Use Bootstrap hoverable rows in directions tables
2024-04-15 18:52:19 +03:00
Anton Khorev
62ba143c3c
Remove some search/directions custom css
2023-10-20 16:58:59 +03:00
Andy Allan
5473be178a
Refactor the directions table to use bootstrap table styling
...
This allows us to remove some custom CSS
2023-09-13 11:30:50 +01:00
Tom Hughes
4e0c5f5fcb
Make distances in directions translatable
...
Fixes #3888
2023-01-10 20:58:10 +00:00
Anton Khorev
6c415ef142
Add aria-label to close buttons
2022-10-31 23:54:58 +03:00
Anton Khorev
58f0eea2a4
Remove unnecessary wrapper divs
2022-09-20 10:15:19 +03:00
Anton Khorev
fb75f447d7
Remove top margins from close buttons
2022-09-02 17:02:46 +03:00
Anton Khorev
351a785949
Remove geolink and close button nesting
2022-09-01 00:42:50 +03:00
Anton Khorev
f41b5558b7
Position directions close button with flex
2022-08-28 00:32:50 +03:00
Anton Khorev
66e526c2d5
Changed directions close button to Bootstrap
2022-07-27 20:54:47 +03:00
Andy Allan
c8f0a81eb7
Rework sidebar to use padding on the sidebar_content div
...
This saves every header, list, paragraph etc having to sort out their own padding. The couple of instances where we want edge-to-edge can be acheived using the negative margin spacing utilities.
The padding is based on $spacer so that it can be adjusted automatically via bootstrap configuration.
This also means that we can remove many (mis-)uses of the browse-section class, which is only supposed to be for cases where there are multiple browse-sections in sequence (e.g. multiple nodes in the node history browse pages).
2021-06-16 15:45:58 +01:00
Andy Allan
c2587b5b57
Rework the routing credit to use a bootstrap class
...
The padding is unnecessary given it's in a paragraph anyway.
2021-06-16 13:28:33 +01:00
Tom Hughes
0a15112423
Mark javascript issued cookies with SameSite=Lax
2021-05-17 19:06:43 +01:00
Tom Hughes
32cc04fa5c
Switch to using js-cookie to manage cookies from javascript
2021-05-17 18:57:48 +01:00
Tom Hughes
f91dd6afc2
Tighten up cookie security
...
Mark all cookies as Secure, and the cookies which are not
modified client side as HttpOnly.
2021-02-19 18:18:13 +00:00
Tucker Chapman
d257e67842
Remove conditional for polyline layer
...
When a user searches for a route and one is not found the polyline
layer is removed - if they then change the mode of transportation the
event listener will not reroute if there is no polyline layer.
This commit removes the conditional that prevents the routing code from
re-running after the polyline has been removed.
Fixes #3050
Closes #3055
2021-01-28 10:31:33 +00:00
Tom Hughes
79447e7549
Replace querystring parser with qs yarn module
2020-08-06 20:51:55 +01:00
Holger Jeromin
c70e919b47
rename internal variable
2020-02-26 20:27:52 +01:00
Holger Jeromin
c094cc1933
further linting stuff
2020-01-26 11:26:58 +01:00
Holger Jeromin
f9ab67577f
fixing linting
2020-01-26 11:22:50 +01:00
Holger Jeromin
a32f4c231e
Prevent exceptions while reversing directions
2020-01-26 11:01:45 +01:00
marc tobias
61faea262a
Pass viewbox to Nominatim when geocoding routing endpoints
...
Fixes #2327
Closes #2328
2019-07-25 19:24:36 +01:00
Tom Hughes
6dd451c7ee
Stop creating a shared global querystring variable
2019-07-15 20:28:54 +01:00
Tom Hughes
a47c0a4411
Update querystring references
2019-07-15 10:03:09 +01:00
Tom Hughes
492a640530
Enable a few more eslint checks
2019-07-14 12:08:02 +01:00
Tom Hughes
c4c0e8105a
Enforce consistent indentation in javascript code
2019-07-14 10:52:18 +01:00
Tom Hughes
5bd59e1936
Enable a number of eslint style rules
2019-04-07 17:02:39 +01:00
Tom Hughes
eb7678145a
Use double quotes consistently in javascript code
2019-04-06 15:59:34 +01:00
Tom Hughes
1f13321a60
Fix issues found by eslint
2019-04-01 22:03:39 +01:00
Tom Hughes
48e886784e
Change default directions engine to fossgis_osrm_car
...
Also handle old cookies and URLs that ask for engines that
are no longer available.
2019-01-29 20:19:36 +00:00