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
|
|
@ -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