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 |
26
dist/leaflet.css
vendored
26
dist/leaflet.css
vendored
@ -305,15 +305,20 @@
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.leaflet-popup-close-button {
|
||||
.leaflet-container a.leaflet-popup-close-button {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
||||
overflow: hidden;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
text-align: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||
color: #ccc;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #999;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 18px 0;
|
||||
@ -362,7 +367,4 @@
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
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) {
|
||||
closeButton = this._closeButton = L.DomUtil.create('a', prefix + '-close-button', container);
|
||||
closeButton.href = '#close';
|
||||
closeButton.innerHTML = '×';
|
||||
|
||||
L.DomEvent.on(closeButton, 'click', this._onCloseButtonClick, this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user