Commit graph

71 commits

Author SHA1 Message Date
Norbert Renner
b894639c2f Prevent sporadic canvas mouseout bubbling to map
Fixes #561
2022-06-21 20:37:02 +02:00
Norbert Renner
0fc60c1821 Work around iOS 3rd party browser download (#418)
- use FileReader.readAsDataURL (for iOS Chromium)
- add alternative Download from Server for now until proven in Prod and fixed in iOS Firefox (no i18n)
- replace cloud icons as client-side now
2022-05-28 14:27:32 +02:00
Norbert Renner
35c4b6ab87 Fix trailer not hidden on segment hover 2022-05-16 13:13:09 +02:00
Norbert Renner
d8e0e8ee09 Simplify response check, beeline has feature now 2022-05-06 15:27:46 +02:00
Norbert Renner
72588f3fd9 Only use Canvas for routing segments
Routing trailers are lagging behind and Canvas by default might have side effects (Plugins)
2022-05-04 22:21:51 +02:00
Norbert Renner
855dc81283 Show gap in elevation graph for single beeline 2022-05-02 10:55:20 +02:00
Norbert Renner
7f481b8db3 Pass estimated cost factor to kinematic calc
(only to use different formula > 4.9)
2022-04-26 12:41:41 +02:00
Norbert Renner
c122b31e73 Replace ??=, not supported by i18next-scanner 2022-04-11 18:59:28 +02:00
Norbert Renner
42d8b27266 Add time and energy to messages 2022-04-11 18:37:40 +02:00
Norbert Renner
5dd801d714 Interpolate cost by using max of neighbours 2022-04-09 11:55:56 +02:00
Norbert Renner
2f8ddfa9e7 Interpolate ascend stats 2022-04-06 11:51:20 +02:00
Norbert Renner
30f8a88957 Interpolate stats over consecutive beelines 2022-04-01 14:30:08 +02:00
Norbert Renner
4d44153316 Read time/energy calc variables from profile
and ensure profile text is loaded before updating route and straight line stats
2022-02-15 19:30:49 +01:00
Norbert Renner
9abf4b94c4 Calc stats for straight line 2022-02-07 17:52:16 +01:00
Norbert Renner
fe05081678 Add beeline support to distance markers
- update on beeline toggle
- avoid distance markers wandering accross the map while routing many waypoints, because beelines are added immediately, by turning off updates in-between
2021-07-02 19:44:43 +02:00
Norbert Renner
7118cc70d7 Show empty cells in data tab instead of 0
which makes it more clear that there is no data
2021-07-01 12:05:16 +02:00
Norbert Renner
9f4a4983c5 Support beelines on reverse 2021-07-01 12:02:49 +02:00
Norbert Renner
39f3a10965 Support beelines in data and analysis tabs (WIP) 2021-06-25 22:33:11 +02:00
Norbert Renner
3c8be96085 Support beelines in hash url (first stab) 2021-06-19 16:23:01 +02:00
Norbert Renner
f3d48dc63e Add message headings to fix error in data tab 2021-06-12 11:19:57 +02:00
Norbert Renner
cafb87cc6e Add basic beeline support by dummy feature 2021-06-09 17:04:11 +02:00
Norbert Renner
eb8492e30d Fix loading trailer animation 2021-06-03 20:30:08 +02:00
Norbert Renner
7c1347668d Prevent trailer showing on beeline button clicks 2021-05-21 17:43:52 +02:00
Norbert Renner
91108bc334 Fix hidden routing marker still being interactive 2021-05-20 21:02:31 +02:00
Norbert Renner
47f3a06be6 Improve route interactivity by using canvas 2021-05-20 13:11:18 +02:00
Norbert Renner
6ea972bcf8 Avoid accidental zooms while drawing beeline 2021-04-30 18:30:01 +02:00
Norbert Renner
b4368c1f51 Toggle beeline mode and style beeline
Restore removed key listeners of super class to avoid duplicate calls (36d8a20)
2021-04-29 20:41:38 +02:00
Norbert Renner
acf9c59888 Initial take on supporting straight line segments 2021-04-16 19:07:52 +02:00
Gautier P
1ff25a566e
Add missing translatable content (#376) 2021-02-26 20:51:36 +01:00
Gautier P
25429b3c24 Update prettier version 2020-12-05 11:51:16 +01:00
Norbert Renner
bacf60a3ba Optimize setWaypoints performance (#312)
Loading a track as route with lots of waypoints (simplify tolerance of 0) caused a long pause before even handling the first route request.

This seems to be caused by a repaint for every added marker/layer. Adding them all at once in FeatureGroup.addTo(map) helps (although still added in a loop).
2020-07-01 10:35:50 +02:00
Henrik Fehlauer
29530919b5 Stop deleting points once there are no more points left
Prevents "Uncaught TypeError: Cannot read property 'off' of null"
in L.Routing.js
2020-06-06 18:00:00 +00:00
Henrik Fehlauer
48f8fe3524 Add shortcut to delete last point
Press 'Z' to undo adding the last point.
2020-06-05 18:00:00 +00:00
Henrik Fehlauer
2848e4dd36 Add shortcut to reverse route
Press 'R' to swap start and end of the route.
2020-06-03 18:00:00 +00:00
Henrik Fehlauer
08c8cfa8be Prevent more accidental shortcut triggers
Do not allow browser keyboard shortcuts to trigger route functions,
e.g. pressing Ctrl+P triggers printing in most browsers, but should not
at the same time switch BRouter-Web to POI mode. This can be prevented
by filtering for modifiers.

In the same fashion, when modal dialogs or dropdowns are open it should
not be possible to activate map functions in the background now.

Finally, inhibit shortcuts in number input fields too, as found in the
editable number input fields in the customize profile options.
Previously only regular text input fields were protected.

To make those checks easier to use, they are deduplicated and moved to
Util.js.
2020-05-28 18:00:00 +00:00
Henrik Fehlauer
36d8a207ab Convert all shortcuts to act on keydown already
Contrary to mouse clicks, when pressing keys on a keyboard the
standard behavior is to perform the associated action immediately,
not only when releasing the key again. This should also improve the
perceived performance slightly.

Note that the 'D' shortcut had formerly been handled by Leaflet, which
we now have to do on our own.

While at it, move the character codes over to the options variable, as
found in other parts of the codebase already.

Also removing the listener from the container does not seem needed
anymore nowadays.
2020-05-26 18:00:00 +00:00
Norbert Renner
502735cb8e
Replace large awesome-markers with smaller vector-markers (#268) 2019-12-18 21:28:58 +01:00
Norbert Renner
9d59d51549 Improve distance markers a bit (#243)
- make icons a bit smaller
  - also results in better vertical centering
- round icon too small for 3 digits, multiply width by digits
- increase opacity a bit for better readability
2019-12-13 12:44:24 +01:00
Gautier Pelloux-Prayer
a23634e1c4 Use custom markers for start and end 2019-10-19 10:15:36 +02:00
matzepan
4fdd375b5c removed let 2019-10-02 23:36:35 +02:00
Unknown
1828a642c3 Remove markers when route is deleted 2019-10-02 15:28:37 +02:00
Unknown
173752c691 Added distance markers to the routing path 2019-10-02 14:23:27 +02:00
Gautier Pelloux-Prayer
d31be926d2 Increase prettier maxwidth to 120 2019-08-10 19:36:36 +02:00
Henrik Fehlauer
2022069066 Fix unintentional shortcut activations when typing text
Test Plan:
Pressing 'd' key in search box and in custom profile editor no longer
activates route drawing.
2019-05-30 23:52:59 +02:00
Gautier Pelloux-Prayer
970a34981f Add prettier and reformat code 2019-05-17 20:55:39 +02:00
Gautier Pelloux-Prayer
d009aa5bc6 Add reverse route button 2019-05-11 17:52:16 +02:00
Norbert Renner
69e53233ba Replace Leaflet.draw with Leaflet.Editable, closes #100 2018-01-12 15:38:47 +01:00
Norbert Renner
6c316c8688 Leaflet 1.0: Fix elevation marker on track hover
Breaking change by "only propagate events if given true to fire, #2311",
6d1142a
2017-07-25 18:10:17 +02:00
Gautier Pelloux-Prayer
9109322905 Use https scheme whenever possible, to avoid mixed content issues 2017-05-09 22:14:39 +02:00
Gautier Pelloux-Prayer
d7e476db82 Updating UI to also fit on mobile devices. Fix #34 2017-01-23 10:47:28 +01:00