Skip to content

Commit

Permalink
Merge pull request #1437 from umap-project/kbd
Browse files Browse the repository at this point in the history
Mention more keyboard shortcuts
  • Loading branch information
yohanboniface authored Nov 27, 2023
2 parents 8903b88 + c34e393 commit 1e419fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions umap/static/umap/js/umap.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ L.U.DrawMarkerAction = L.U.BaseAction.extend({
options: {
helpMenu: true,
className: 'umap-draw-marker dark',
tooltip: L._('Draw a marker'),
tooltip: `${L._('Draw a marker')} (Ctrl+M)`,
},

addHooks: function () {
Expand All @@ -96,7 +96,7 @@ L.U.DrawPolylineAction = L.U.BaseAction.extend({
options: {
helpMenu: true,
className: 'umap-draw-polyline dark',
tooltip: L._('Draw a polyline'),
tooltip: `${L._('Draw a polyline')} (Ctrl+L)`,
},

addHooks: function () {
Expand All @@ -108,7 +108,7 @@ L.U.DrawPolygonAction = L.U.BaseAction.extend({
options: {
helpMenu: true,
className: 'umap-draw-polygon dark',
tooltip: L._('Draw a polygon'),
tooltip: `${L._('Draw a polygone')} (Ctrl+P)`,
},

addHooks: function () {
Expand Down
10 changes: 5 additions & 5 deletions umap/static/umap/js/umap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1881,27 +1881,27 @@ L.U.Map.include({
if (this.editEnabled) {
if (!this.isDirty) {
items.push({
text: `${L._('Stop editing')} (Ctrl+E)`,
text: `${L._('Stop editing')} (<kbd>Ctrl+E</kbd>)`,
callback: this.disableEdit,
})
}
if (this.options.enableMarkerDraw) {
items.push({
text: `${L._('Draw a marker')} (Ctrl+M)`,
text: `${L._('Draw a marker')} (<kbd>Ctrl+M</kbd>)`,
callback: this.startMarker,
context: this,
})
}
if (this.options.enablePolylineDraw) {
items.push({
text: `${L._('Draw a polygon')} (Ctrl+P)`,
text: `${L._('Draw a polygon')} (<kbd>Ctrl+P</kbd>)`,
callback: this.startPolygon,
context: this,
})
}
if (this.options.enablePolygonDraw) {
items.push({
text: `${L._('Draw a line')} (Ctrl+L)`,
text: `${L._('Draw a line')} (<kbd>Ctrl+L</kbd>)`,
callback: this.startPolyline,
context: this,
})
Expand All @@ -1915,7 +1915,7 @@ L.U.Map.include({
})
} else {
items.push({
text: `${L._('Start editing')} (Ctrl+E)`,
text: `${L._('Start editing')} (<kbd>Ctrl+E</kbd>)`,
callback: this.enableEdit,
})
}
Expand Down

0 comments on commit 1e419fc

Please sign in to comment.