improve popup close button, get rid of the image, closes #631

This commit is contained in:
Vladimir Agafonkin 2012-07-12 16:22:14 +03:00
parent aa68310c00
commit f4ecfe61fb
3 changed files with 15 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

24
dist/leaflet.css vendored
View File

@ -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;
@ -363,6 +368,3 @@
.leaflet-popup-content {
font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.leaflet-popup-close-button {
background: white url(images/popup-close.png);
}

View File

@ -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);
}