forked from MapComplete/MapComplete
Feature(hotkeys): add H to jump to home location
This commit is contained in:
parent
e66391fc03
commit
2b34547902
2 changed files with 10 additions and 0 deletions
|
|
@ -192,6 +192,7 @@
|
|||
"openOsmcha": "See latest edits made with {theme}",
|
||||
"openOsmchaLastWeek": "See edits from the last 7 days",
|
||||
"openPanoramax": "Open Panoramax here",
|
||||
"openStatistics": "See statistics for {theme}",
|
||||
"openThemeDocumentation": "Open the documentation for thematic map {name}",
|
||||
"panoramaxHelp": "<b>Panoramax</b> is an online service which gathers street-level pictures and offers them under a free license. Contributors are allowed to use these pictures to improve OpenStreetMap",
|
||||
"panoramaxLicenseCCBYSA": "Your pictures are published under CC-BY-SA - everyone can reuse your image if they mention your name",
|
||||
|
|
@ -526,6 +527,7 @@
|
|||
"action": "Action",
|
||||
"closeSidebar": "Close the sidebar",
|
||||
"geolocate": "Pan the map to the current location or zoom the map to the current location. Requests geopermission",
|
||||
"homeLocation": "Jump to your home location. Only works if you did set your home location in the user preferences",
|
||||
"intro": "MapComplete supports the following keys:",
|
||||
"key": "Key combination",
|
||||
"openFilterPanel": "Opens the POI-layers and filter panel",
|
||||
|
|
|
|||
|
|
@ -225,6 +225,14 @@ export class UserMapFeatureswitchState extends WithUserRelatedState {
|
|||
this.geolocationControl.handleClick()
|
||||
})
|
||||
|
||||
Hotkeys.RegisterHotkey({ nomod: "H" }, Translations.t.hotkeyDocumentation.homeLocation, () => {
|
||||
const home = this.userRelatedState.osmConnection.userDetails.data?.home
|
||||
if (!home) {
|
||||
console.log("No home location set")
|
||||
}
|
||||
this.mapProperties.location.set(home)
|
||||
})
|
||||
|
||||
Hotkeys.RegisterHotkey(
|
||||
{
|
||||
shift: "T",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue