Commit graph

215 commits

Author SHA1 Message Date
Norbert Renner
7fc2f6bee5 Format route points as waypoints 2021-03-18 18:04:57 +01:00
Norbert Renner
2189d68af9 Parse voicehint modes form profile 2021-03-16 19:56:02 +01:00
Norbert Renner
25f8828ae7 Concatenate total track
+ handle server voicehint time removed, times with 3 digits
2021-03-12 21:20:35 +01:00
Gautier P
a0a78cdab2
Translate overlay type and fix width computation (#379) 2021-03-01 20:19:38 +01:00
Gautier P
e188d8f9de
Use plural form when multiple overlays are active (#378) 2021-03-01 20:13:42 +01:00
Gautier P
1a695db333
Add What's new modal (#372) 2021-02-23 18:27:08 +01:00
Gautier P
25429b3c24 Update prettier version 2020-12-05 11:51:16 +01:00
Gautier P
a2366a26bd Split ring in two to avoid routing issue 2020-12-03 21:04:55 +01:00
Gautier P
779c720b7d
Add 20km allowed zone icon (#347)
Co-authored-by: Gautier P <gautier_git@damsy.net>
2020-12-01 20:56:14 +01:00
Norbert Renner
a1af69a44c Prevent submit action to avoid side effects (#328)
Otherwise the download is blocked and a `/?format=gpx#` query is added to the URL in Chromium.
2020-08-04 11:13:24 +02:00
Norbert Renner
2df1f617c9 Improve hiding elevation chart when empty
Consider additional cases:
- flag got reset when deleting and adding first waypoint
- don't show empty on load, postpone to update
- don't store state when hidden because empty
2020-07-16 10:28:40 +02:00
Norbert Renner
4892c2a1db Don't update TrackAnalysis when tab is hidden
- add missing show/hide methods called by sidebar and maintain active state
- rename inconsistent tab id
2020-06-30 21:35:51 +02:00
Henrik Fehlauer
09f987ea07 Combine and reuse translations for keyboard shortcuts
Using i18next's "nesting" and "interpolation" features should reduce the
overall number of strings to translate, as well as provide a
standardized pattern for shortcut tooltips (if applicable).

Note that this approach is still allowing for flexibility regarding
differently structured sentences in each language.

Resolves #315
2020-06-21 18:00:00 +00:00
Henrik Fehlauer
a420ad5c0b Add shortcut to export route
Press 'X' to trigger the export route dialog.

Automatically populating the trackname field should work too.
2020-06-10 18:00:00 +00:00
Henrik Fehlauer
6da520ed4d Add shortcut to toggle profile switcher
Press 'G' to open the profile switcher, select a profile with the arrow
keys, apply with 'Enter' and close the switcher with 'Escape'.

While 'T' and 'P' will be / were already taken, 'G' is at least easily
reachable with the left hand for users using a mouse with their right
hand at the same time.

Since Bootstrap keeps updating the tooltip when changing options in the
dropdown (which is useful in case the text is longer than the width of
the control), the shortcut text needs to be applied dynamically too.
2020-06-09 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
8e65d6a3dd Show analysis table highlight above quality coding layer (#304)
When hovering over rows in the analysis tab, highlighted sections for
the route could only be seen on the regular route, but not when any of
the color-coded route visualisations were selected.

Patch based on a similar fix for data table in d33c795200.
2020-05-25 18:00:00 +00:00
Henrik Fehlauer
8ca92e260d Improve analysis tab CSS
There are some ways the look of the analysis tab can be polished:
- Properly right-align the length header
  (it had extra margins required for the sorting arrows in the data tab)
- Use the same font size for table header and body (like in the data tab)
- Improve padding of the totals row (to align with the rows above)
- Add missing style for headings, so they look more balanced
  (the CSS was already there, but the wrong class was used in the HTML)
- Fine-tune vertical spacing (to help visual grouping)
- Remove unused and redundant CSS
- Do not show yellow hover effect over table header
2020-05-24 18:00:00 +00:00
Norbert Renner
71317b84e4 Fix analysis sorting
Return value of the sort compare function is defined as value less, equal or greater than 0, not as boolean.
2020-06-12 10:57:41 +02:00
Marcus Jaschen
fc54c65e23 Add sidebar tab with route analysis data
- adds a new analysis tab in the sidebar
- the analysis tab shows length distribution for different way types, surface, and smoothness
- table rows can be hovered/clicked to highlight the according segments on the map (similar behaviour as the detailed data table)
- localization is implemented for `de` and `en`
- the method for finding segment edges was extracted from `js/control/TrackMessages.js` into `js/util/TrackEdges.js` as it's used in the new analysis class too (the Gulp config was changed to reflect that)

Notes:

I had the idea to use the *DataTable* plugin for rendering the tables but decided against it. The only meaningful way to sort such a table is by the length column and that's already the case. So it's just three plain, old HTML tables, rendered by jQuery.

For meaningful statistics the `processUnusedTags` setting has to be enabled in the routing profile. Only in this case the BRouter backend includes all needed tags (`highway`, `surface`, and `smoothness`) for *every* route segment in the response. I’ve enabled that setting for all profiles at my BRouter-web instance at <https://brouter.m11n.de/>.
2020-06-07 16:56:50 +02:00
Stefan Siegl
64202a451c
Allow to mute route 2020-06-06 21:47:58 +02:00
Norbert Renner
1b66989cfb
Merge pull request #292 from tbsmark86/master
Fix: Profile params of type 'select' ignored default value from profile
2020-05-27 08:27:35 +02:00
Gautier P
bbaad4f8b3 Hide stats footer by default and collapse elevation chart if needed 2020-05-25 20:22:49 +02:00
Gautier P
a358aed464 Improve stats footer on mobile #296 2020-05-24 19:50:14 +02:00
Gautier P
52be57f5ba Always display 3 digits for distance title, even when ending with zeros 2020-05-24 19:23:00 +02:00
Tobias
3457f92fbf Fix: Profile params of type 'select' ignored default value from profile 2020-05-13 17:14:53 +02:00
Norbert Renner
86d42de458 Show icon indicator when profile is pinned (modified in editor) 2020-02-07 20:02:32 +01:00
Norbert Renner
c94a530f49 Fix overwriting editor changes when switching profile tabs 2020-02-06 20:27:57 +01:00
Norbert Renner
07425148ee Set custom profileName after post
Otherwise next cache get after tab switching still uses original profile
2020-02-05 19:59:55 +01:00
Norbert Renner
164431dccb Fix "Layer not found: route-quality" error msg (ignore built-in layers) 2020-01-08 19:13:15 +01:00
Norbert Renner
83ffa4091d Fix errors when profilesUrl is not defined in config (text undefined) 2020-01-02 13:36:33 +01:00
Norbert Renner
d33c795200 Show data table highlight above quality coding layer (#242) 2019-12-12 12:24:43 +01:00
Norbert Renner
a71dfe7895
Add hints and feedback for optional layers tree usage (#263) 2019-12-06 09:31:55 +01:00
Norbert Renner
0781bb85dc Use Polyline.getCenter instead of bounds to center hover on map (#241)
Returns point on line at half distance instead of centroid of bounds,
which can be far off the line for curved lines and not show line at high
zooms.
2019-11-30 12:28:48 +01:00
Norbert Renner
b57c4f2bf6 Make data row selectable, centers on map, disables hover sync (#241) 2019-11-30 12:18:15 +01:00
Norbert Renner
a585dde182 Add switch to turn off centering hovered data table entry on map (#241) 2019-11-30 09:38:12 +01:00
Norbert Renner
a70cf43838 Fix Custom option not disabled when URL with profile
Getting value of 'profile' ele no longer works (?), replace with proper
check if profile name is custom.
2019-11-29 15:45:31 +01:00
Norbert Renner
a006d64a6d Don't show save warning in editor tab on options apply 2019-11-13 11:11:14 +01:00
Norbert Renner
4efa6247aa Improve profile parameters layout: button always visible, smaller font
- Flexbox layout with scrolling inner content instead of whole tab
- same smaller font size like in layers tab, small input fields
2019-11-13 10:44:34 +01:00
Norbert Renner
b0b8a3d0c0 Remove button state "uploading", no longer supported in Bootstrap v4
https://getbootstrap.com/docs/4.3/migration/#buttons
https://getbootstrap.com/docs/3.3/javascript/#buttons-stateful
2019-11-12 10:04:13 +01:00
Norbert Renner
21a8d8b5de Replace profile options/editor switch buttons with Bootstrap tabs 2019-11-11 19:30:29 +01:00
Norbert Renner
ef9cc7abe7
Merge pull request #235 from Phyks/custom-profiles
First PoC for UI for customizing profile
2019-11-09 09:47:32 +01:00
Norbert Renner
cb8aeee6ea
Merge pull request #241 from matzepan/feature/center-track
Feature/Center the map to the track when hovering on it
2019-10-11 12:39:35 +02:00
Norbert Renner
ddf8e27085
Merge pull request #226 from bagage/222-add-users-poi
export user's POI (point of interest)
2019-10-10 22:17:44 +02:00
Gautier Pelloux-Prayer
fa5af58372 Add markers POI layer 2019-10-10 21:07:49 +02:00
Phyks (Lucas Verney)
f331773363 Cache custom profiles 2019-10-08 14:33:41 +02:00
Phyks (Lucas Verney)
a77413e1eb Fix an error upon editing profile with a route set 2019-10-08 14:20:51 +02:00
Phyks (Lucas Verney)
43ac9db50c Keep advanced and basic editor in sync 2019-09-27 11:18:27 +02:00
Phyks (Lucas Verney)
83390fc05c Add a message when no configuration options are available 2019-09-27 11:09:13 +02:00
Phyks (Lucas Verney)
ff86c85a8a Full first draft of a working UI 2019-09-27 11:09:13 +02:00