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).
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.
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.
- 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
- negative zIndexOffset to have line marker under waypoint markers
- turn line marker off when over waypoint marker
- consider border width in iconAnchor (fix offset from line)
- same border color and width as line (instead of black)