Skip to content

Commit

Permalink
Add Tools tab to keyboard shortcuts, add panels key shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Jul 5, 2017
1 parent 3043323 commit 76f9397
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 24 deletions.
6 changes: 6 additions & 0 deletions css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3172,6 +3172,7 @@ img.tile-removing {

.modal-shortcuts .modal-section:last-child {
padding-top: 10px;
min-height: 275px;
}

.modal-shortcuts .tabs-bar {
Expand Down Expand Up @@ -3206,6 +3207,11 @@ img.tile-removing {
width: 50%;
}

.modal-shortcuts .shortcut-tab-tools .shortcut-column {
flex: 1 1 100%;
width: 100%;
}

.modal-shortcuts td {
padding-bottom: 5px;
}
Expand Down
26 changes: 17 additions & 9 deletions data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ en:
truncated_list: "Edits by {users} and {count} others"
info_panels:
key: I
background:
key: B
title: Background
zoom: Zoom
vintage: Vintage
unknown: Unknown
show_tiles: Show Tiles
hide_tiles: Hide Tiles
history:
key: H
title: History
Expand All @@ -284,14 +292,6 @@ en:
changeset: Changeset
unknown: Unknown
link_text: History on openstreetmap.org
background:
key: B
title: Background
zoom: Zoom
vintage: Vintage
unknown: Unknown
show_tiles: Show Tiles
hide_tiles: Hide Tiles
location:
key: L
title: Location
Expand Down Expand Up @@ -1101,7 +1101,6 @@ en:
lasso: "Draw a selection lasso around features"
with_selected:
title: "With feature selected"
info_panels: "Toggle information panels"
edit_menu: "Toggle edit menu"
vertex_selected:
title: "With node selected"
Expand Down Expand Up @@ -1141,3 +1140,12 @@ en:
undo: "Undo last action"
redo: "Redo last action"
save: "Save changes"
tools:
title: "Tools"
info:
title: "Information"
all: "Toggle all information panels"
background: "Toggle background panel"
history: "Toggle history panel"
location: "Toggle location panel"
measurement: "Toggle measurement panel"
40 changes: 36 additions & 4 deletions data/shortcuts.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@
"shortcuts": ["Right-click", "shortcuts.key.space"],
"text": "shortcuts.browsing.with_selected.edit_menu"
}, {
"modifiers": [""],
"shortcuts": ["info_panels.key"],
"text": "shortcuts.browsing.with_selected.info_panels"
"shortcuts": [],
"text": ""
},

{
Expand Down Expand Up @@ -166,7 +165,7 @@
"shortcuts": ["Z"],
"text": "shortcuts.editing.commands.undo"
}, {
"modifiers": ["",""],
"modifiers": ["", ""],
"shortcuts": ["Z"],
"text": "shortcuts.editing.commands.redo"
}, {
Expand Down Expand Up @@ -221,5 +220,38 @@
]
}
]
}, {
"tab": "tools",
"text": "shortcuts.tools.title",
"columns" : [
{
"rows": [
{
"section": "info",
"text": "shortcuts.tools.info.title"
}, {
"modifiers": [""],
"shortcuts": ["info_panels.key"],
"text": "shortcuts.tools.info.all"
}, {
"modifiers": ["", ""],
"shortcuts": ["info_panels.background.key"],
"text": "shortcuts.tools.info.background"
}, {
"modifiers": ["", ""],
"shortcuts": ["info_panels.history.key"],
"text": "shortcuts.tools.info.history"
}, {
"modifiers": ["", ""],
"shortcuts": ["info_panels.location.key"],
"text": "shortcuts.tools.info.location"
}, {
"modifiers": ["", ""],
"shortcuts": ["info_panels.measurement.key"],
"text": "shortcuts.tools.info.measurement"
}
]
}
]
}
]}
30 changes: 20 additions & 10 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,15 @@
},
"info_panels": {
"key": "I",
"background": {
"key": "B",
"title": "Background",
"zoom": "Zoom",
"vintage": "Vintage",
"unknown": "Unknown",
"show_tiles": "Show Tiles",
"hide_tiles": "Hide Tiles"
},
"history": {
"key": "H",
"title": "History",
Expand All @@ -361,15 +370,6 @@
"unknown": "Unknown",
"link_text": "History on openstreetmap.org"
},
"background": {
"key": "B",
"title": "Background",
"zoom": "Zoom",
"vintage": "Vintage",
"unknown": "Unknown",
"show_tiles": "Show Tiles",
"hide_tiles": "Hide Tiles"
},
"location": {
"key": "L",
"title": "Location",
Expand Down Expand Up @@ -979,7 +979,6 @@
},
"with_selected": {
"title": "With feature selected",
"info_panels": "Toggle information panels",
"edit_menu": "Toggle edit menu"
},
"vertex_selected": {
Expand Down Expand Up @@ -1025,6 +1024,17 @@
"redo": "Redo last action",
"save": "Save changes"
}
},
"tools": {
"title": "Tools",
"info": {
"title": "Information",
"all": "Toggle all information panels",
"background": "Toggle background panel",
"history": "Toggle history panel",
"location": "Toggle location panel",
"measurement": "Toggle measurement panel"
}
}
},
"presets": {
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function uiShortcuts() {
var shortcutsEnter = shortcuts
.enter()
.append('div')
.attr('class', 'shortcut-tab');
.attr('class', function(d) { return 'shortcut-tab shortcut-tab-' + d.tab; });

var columnsEnter = shortcutsEnter
.selectAll('.shortcut-column')
Expand Down

0 comments on commit 76f9397

Please sign in to comment.