Restore help button icon
While changing the edit header help link, I've changed all help buttons, which was not intended.
This commit is contained in:
parent
3d32bf206b
commit
d78f2e087e
3 changed files with 22 additions and 4 deletions
|
@ -1010,7 +1010,7 @@ L.U.Map.include({
|
||||||
disable.href = '#'
|
disable.href = '#'
|
||||||
disable.textContent = L._('Disable editing')
|
disable.textContent = L._('Disable editing')
|
||||||
disable.title = `${disable.textContent} (Ctrl+E)`
|
disable.title = `${disable.textContent} (Ctrl+E)`
|
||||||
this.help.button(container, 'edit')
|
this.help.link(container, 'edit')
|
||||||
if (this.options.user) {
|
if (this.options.user) {
|
||||||
const userLabel = L.DomUtil.add(
|
const userLabel = L.DomUtil.add(
|
||||||
'a',
|
'a',
|
||||||
|
|
|
@ -428,10 +428,9 @@ L.U.Help = L.Class.extend({
|
||||||
return typeof this[name] === 'function' ? this[name]() : this[name]
|
return typeof this[name] === 'function' ? this[name]() : this[name]
|
||||||
},
|
},
|
||||||
|
|
||||||
button: function (container, entries) {
|
button: function (container, entries, classname) {
|
||||||
const helpButton = L.DomUtil.create('a', 'umap-help-button', container)
|
const helpButton = L.DomUtil.create('a', classname || 'umap-help-button', container)
|
||||||
helpButton.href = '#'
|
helpButton.href = '#'
|
||||||
helpButton.textContent = L._("Help")
|
|
||||||
if (entries) {
|
if (entries) {
|
||||||
L.DomEvent.on(helpButton, 'click', L.DomEvent.stop).on(
|
L.DomEvent.on(helpButton, 'click', L.DomEvent.stop).on(
|
||||||
helpButton,
|
helpButton,
|
||||||
|
@ -446,6 +445,12 @@ L.U.Help = L.Class.extend({
|
||||||
return helpButton
|
return helpButton
|
||||||
},
|
},
|
||||||
|
|
||||||
|
link: function (container, entries) {
|
||||||
|
const helpButton = this.button(container, entries, 'umap-help-link')
|
||||||
|
helpButton.textContent = L._("Help")
|
||||||
|
return helpButton
|
||||||
|
},
|
||||||
|
|
||||||
edit: function () {
|
edit: function () {
|
||||||
const container = L.DomUtil.create('div', ''),
|
const container = L.DomUtil.create('div', ''),
|
||||||
self = this,
|
self = this,
|
||||||
|
|
|
@ -348,6 +348,19 @@ ul.photon-autocomplete {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.umap-help-button {
|
.umap-help-button {
|
||||||
|
display: inline-block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-left: 5px;
|
||||||
|
background-position: -4px -4px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: url('./img/16.svg');
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.dark .umap-help-button {
|
||||||
|
background-image: url('./img/16-white.svg');
|
||||||
|
}
|
||||||
|
.umap-help-link {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue