Better labels and icons for edit/preview modes

Fix #556
This commit is contained in:
David Larlet 2023-10-27 11:31:34 -04:00
parent 2f424b7539
commit 1d65ce6b49
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
2 changed files with 7 additions and 7 deletions

View file

@ -323,7 +323,7 @@ L.U.EditControl = L.Control.extend({
const enableEditing = L.DomUtil.createButton(
'',
container,
L._('Enable editing'),
L._('Edit'),
map.enableEdit,
map
)
@ -332,7 +332,7 @@ L.U.EditControl = L.Control.extend({
'mouseover',
function () {
map.ui.tooltip({
content: `${L._('Edit map')} (<kbd>Ctrl+E</kbd>)`,
content: `${L._('Switch to edit mode')} (<kbd>Ctrl+E</kbd>)`,
anchor: enableEditing,
position: 'bottom',
delay: 750,
@ -977,7 +977,7 @@ L.U.Map.include({
const controlEditDisable = L.DomUtil.createButton(
'leaflet-control-edit-disable',
rightContainer,
L.DomUtil.add('span', '', null, L._('Disable editing')),
L.DomUtil.add('span', '', null, L._('View')),
function (e) {
this.disableEdit(e)
this.ui.closePanel()
@ -989,7 +989,7 @@ L.U.Map.include({
'mouseover',
function () {
this.ui.tooltip({
content: `${L._('Disable editing')} (<kbd>Ctrl+E</kbd>)`,
content: `${L._('Back to preview')} (<kbd>Ctrl+E</kbd>)`,
anchor: controlEditDisable,
position: 'bottom',
delay: 500,
@ -1001,7 +1001,7 @@ L.U.Map.include({
const controlEditSave = L.DomUtil.createButton(
'leaflet-control-edit-save button',
rightContainer,
L.DomUtil.add('span', '', null, L._('Save current edits')),
L.DomUtil.add('span', '', null, L._('Save')),
this.save,
this
)
@ -1010,7 +1010,7 @@ L.U.Map.include({
'mouseover',
function () {
this.ui.tooltip({
content: `${L._('Save')} (<kbd>Ctrl+S</kbd>)`,
content: `${L._('Save current edits')} (<kbd>Ctrl+S</kbd>)`,
anchor: controlEditSave,
position: 'bottom',
delay: 500,

View file

@ -463,7 +463,7 @@ ul.photon-autocomplete {
background-position: -2px -25px;
}
.leaflet-container .leaflet-control-edit-disable:before {
background-position: -26px -1px;
background-position: -52px -25px;
}
.leaflet-container .leaflet-control-edit-cancel,
.leaflet-container .leaflet-control-edit-disable {