Run prettier
This commit is contained in:
parent
c79e875498
commit
1ed6a5972d
1 changed files with 34 additions and 28 deletions
|
@ -454,51 +454,50 @@ L.U.Keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
L.U.Help = L.Class.extend({
|
L.U.Help = L.Class.extend({
|
||||||
|
|
||||||
SHORTCUTS: {
|
SHORTCUTS: {
|
||||||
DRAW_MARKER: {
|
DRAW_MARKER: {
|
||||||
shortcut: 'Modifier+M',
|
shortcut: 'Modifier+M',
|
||||||
label: L._('Draw a marker')
|
label: L._('Draw a marker'),
|
||||||
},
|
},
|
||||||
DRAW_LINE: {
|
DRAW_LINE: {
|
||||||
shortcut: 'Modifier+L',
|
shortcut: 'Modifier+L',
|
||||||
label: L._('Draw a polyline')
|
label: L._('Draw a polyline'),
|
||||||
},
|
},
|
||||||
DRAW_POLYGON: {
|
DRAW_POLYGON: {
|
||||||
shortcut: 'Modifier+P',
|
shortcut: 'Modifier+P',
|
||||||
label: L._('Draw a polygon')
|
label: L._('Draw a polygon'),
|
||||||
},
|
},
|
||||||
TOGGLE_EDIT: {
|
TOGGLE_EDIT: {
|
||||||
shortcut: 'Modifier+E',
|
shortcut: 'Modifier+E',
|
||||||
label: L._('Toggle edit mode')
|
label: L._('Toggle edit mode'),
|
||||||
},
|
},
|
||||||
STOP_EDIT: {
|
STOP_EDIT: {
|
||||||
shortcut: 'Modifier+E',
|
shortcut: 'Modifier+E',
|
||||||
label: L._('Stop editing')
|
label: L._('Stop editing'),
|
||||||
},
|
},
|
||||||
SAVE_MAP: {
|
SAVE_MAP: {
|
||||||
shortcut: 'Modifier+S',
|
shortcut: 'Modifier+S',
|
||||||
label: L._('Save map')
|
label: L._('Save map'),
|
||||||
},
|
},
|
||||||
IMPORT_PANEL: {
|
IMPORT_PANEL: {
|
||||||
shortcut: 'Modifier+I',
|
shortcut: 'Modifier+I',
|
||||||
label: L._('Import data')
|
label: L._('Import data'),
|
||||||
},
|
},
|
||||||
SEARCH: {
|
SEARCH: {
|
||||||
shortcut: 'Modifier+F',
|
shortcut: 'Modifier+F',
|
||||||
label: L._('Search location')
|
label: L._('Search location'),
|
||||||
},
|
},
|
||||||
CANCEL: {
|
CANCEL: {
|
||||||
shortcut: 'Modifier+Z',
|
shortcut: 'Modifier+Z',
|
||||||
label: L._('Cancel edits')
|
label: L._('Cancel edits'),
|
||||||
},
|
},
|
||||||
PREVIEW: {
|
PREVIEW: {
|
||||||
shortcut: 'Modifier+E',
|
shortcut: 'Modifier+E',
|
||||||
label: L._('Back to preview')
|
label: L._('Back to preview'),
|
||||||
},
|
},
|
||||||
SAVE: {
|
SAVE: {
|
||||||
shortcut: 'Modifier+S',
|
shortcut: 'Modifier+S',
|
||||||
label: L._('Save current edits')
|
label: L._('Save current edits'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -507,7 +506,10 @@ L.U.Help = L.Class.extend({
|
||||||
const modifier = this.isMacOS ? 'Cmd' : 'Ctrl'
|
const modifier = this.isMacOS ? 'Cmd' : 'Ctrl'
|
||||||
shortcut = shortcut.replace('Modifier', modifier)
|
shortcut = shortcut.replace('Modifier', modifier)
|
||||||
if (withKbdTag) {
|
if (withKbdTag) {
|
||||||
shortcut = shortcut.split('+').map((el) => `<kbd>${el}</kbd>`).join('+')
|
shortcut = shortcut
|
||||||
|
.split('+')
|
||||||
|
.map((el) => `<kbd>${el}</kbd>`)
|
||||||
|
.join('+')
|
||||||
label += ` ${shortcut}`
|
label += ` ${shortcut}`
|
||||||
} else {
|
} else {
|
||||||
label += ` (${shortcut})`
|
label += ` (${shortcut})`
|
||||||
|
@ -533,7 +535,9 @@ L.U.Help = L.Class.extend({
|
||||||
const label = L.DomUtil.create('span', '', closeButton)
|
const label = L.DomUtil.create('span', '', closeButton)
|
||||||
label.title = label.textContent = L._('Close')
|
label.title = label.textContent = L._('Close')
|
||||||
this.content = L.DomUtil.create('div', 'umap-help-content', this.box)
|
this.content = L.DomUtil.create('div', 'umap-help-content', this.box)
|
||||||
this.isMacOS = /mac/i.test(navigator.userAgentData ? navigator.userAgentData.platform : navigator.platform)
|
this.isMacOS = /mac/i.test(
|
||||||
|
navigator.userAgentData ? navigator.userAgentData.platform : navigator.platform
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
onKeyDown: function (e) {
|
onKeyDown: function (e) {
|
||||||
|
@ -726,7 +730,9 @@ L.U.Help = L.Class.extend({
|
||||||
facetKey: L._(
|
facetKey: L._(
|
||||||
'Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)'
|
'Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)'
|
||||||
),
|
),
|
||||||
interactive: L._('If false, the polygon or line will act as a part of the underlying map.'),
|
interactive: L._(
|
||||||
|
'If false, the polygon or line will act as a part of the underlying map.'
|
||||||
|
),
|
||||||
outlink: L._('Define link to open in a new window on polygon click.'),
|
outlink: L._('Define link to open in a new window on polygon click.'),
|
||||||
dynamicRemoteData: L._('Fetch data each time map view changes.'),
|
dynamicRemoteData: L._('Fetch data each time map view changes.'),
|
||||||
proxyRemoteData: L._("To use if remote server doesn't allow cross domain (slower)"),
|
proxyRemoteData: L._("To use if remote server doesn't allow cross domain (slower)"),
|
||||||
|
|
Loading…
Reference in a new issue