improve popup close button, get rid of the image, closes #631
This commit is contained in:
parent
aa68310c00
commit
f4ecfe61fb
BIN
dist/images/popup-close.png
vendored
BIN
dist/images/popup-close.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
24
dist/leaflet.css
vendored
24
dist/leaflet.css
vendored
@ -305,15 +305,20 @@
|
|||||||
-o-transform: rotate(45deg);
|
-o-transform: rotate(45deg);
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
}
|
}
|
||||||
.leaflet-popup-close-button {
|
.leaflet-container a.leaflet-popup-close-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 3px;
|
||||||
right: 8px;
|
right: 3px;
|
||||||
|
text-align: center;
|
||||||
width: 10px;
|
width: 24px;
|
||||||
height: 10px;
|
height: 24px;
|
||||||
|
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||||
overflow: hidden;
|
color: #ccc;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
.leaflet-popup-content p {
|
.leaflet-popup-content p {
|
||||||
margin: 18px 0;
|
margin: 18px 0;
|
||||||
@ -363,6 +368,3 @@
|
|||||||
.leaflet-popup-content {
|
.leaflet-popup-content {
|
||||||
font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
.leaflet-popup-close-button {
|
|
||||||
background: white url(images/popup-close.png);
|
|
||||||
}
|
|
||||||
|
@ -107,6 +107,7 @@ L.Popup = L.Class.extend({
|
|||||||
if (this.options.closeButton) {
|
if (this.options.closeButton) {
|
||||||
closeButton = this._closeButton = L.DomUtil.create('a', prefix + '-close-button', container);
|
closeButton = this._closeButton = L.DomUtil.create('a', prefix + '-close-button', container);
|
||||||
closeButton.href = '#close';
|
closeButton.href = '#close';
|
||||||
|
closeButton.innerHTML = '×';
|
||||||
|
|
||||||
L.DomEvent.on(closeButton, 'click', this._onCloseButtonClick, this);
|
L.DomEvent.on(closeButton, 'click', this._onCloseButtonClick, this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user