Merge branch 'stable' into gh-pages
This commit is contained in:
commit
0f68e16104
@ -7,6 +7,11 @@ Leaflet Changelog
|
||||
|
||||
An in-progress version being developed on the master branch.
|
||||
|
||||
## 0.4.2 (August 1, 2012)
|
||||
|
||||
* Fixed a bug where layers control radio buttons would not work correctly in IE7 (by [@danzel](https://github.com/danzel)). [#862](https://github.com/CloudMade/Leaflet/pull/862)
|
||||
* Fixed a bug where `FeatureGroup` `removeLayer` would unbind popups of removed layers even if the popups were not put by the group (affected [Leaflet.markercluster](https://github.com/danzel/Leaflet.markercluster) plugin) (by [@danzel](https://github.com/danzel)). [#861](https://github.com/CloudMade/Leaflet/pull/861)
|
||||
|
||||
## 0.4.1 (July 31, 2012)
|
||||
|
||||
* Fixed a bug that caused marker shadows appear as opaque black in IE6-8. [#850](https://github.com/CloudMade/Leaflet/issues/850)
|
||||
|
39
dist/leaflet-src.js
vendored
39
dist/leaflet-src.js
vendored
@ -3513,7 +3513,11 @@ L.FeatureGroup = L.LayerGroup.extend({
|
||||
|
||||
L.LayerGroup.prototype.removeLayer.call(this, layer);
|
||||
|
||||
return this.invoke('unbindPopup');
|
||||
if (this._popupContent) {
|
||||
return this.invoke('unbindPopup');
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
bindPopup: function (content) {
|
||||
@ -6925,16 +6929,35 @@ L.Control.Layers = L.Control.extend({
|
||||
this._separator.style.display = (overlaysPresent && baseLayersPresent ? '' : 'none');
|
||||
},
|
||||
|
||||
_addItem: function (obj, onclick) {
|
||||
var label = document.createElement('label');
|
||||
// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)
|
||||
_createRadioElement: function (name, checked) {
|
||||
|
||||
var input = document.createElement('input');
|
||||
if (!obj.overlay) {
|
||||
input.name = 'leaflet-base-layers';
|
||||
var radioHtml = '<input type="radio" name="' + name + '"';
|
||||
if (checked) {
|
||||
radioHtml += ' checked="checked"';
|
||||
}
|
||||
input.type = obj.overlay ? 'checkbox' : 'radio';
|
||||
radioHtml += '/>';
|
||||
|
||||
var radioFragment = document.createElement('div');
|
||||
radioFragment.innerHTML = radioHtml;
|
||||
|
||||
return radioFragment.firstChild;
|
||||
},
|
||||
|
||||
_addItem: function (obj) {
|
||||
var label = document.createElement('label'),
|
||||
input,
|
||||
checked = this._map.hasLayer(obj.layer);
|
||||
|
||||
if (obj.overlay) {
|
||||
input = document.createElement('input');
|
||||
input.type = 'checkbox';
|
||||
input.defaultChecked = checked;
|
||||
} else {
|
||||
input = this._createRadioElement('leaflet-base-layers', checked);
|
||||
}
|
||||
|
||||
input.layerId = L.Util.stamp(obj.layer);
|
||||
input.defaultChecked = this._map.hasLayer(obj.layer);
|
||||
|
||||
L.DomEvent.on(input, 'click', this._onInputClick, this);
|
||||
|
||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
@ -133,16 +133,35 @@ L.Control.Layers = L.Control.extend({
|
||||
this._separator.style.display = (overlaysPresent && baseLayersPresent ? '' : 'none');
|
||||
},
|
||||
|
||||
_addItem: function (obj, onclick) {
|
||||
var label = document.createElement('label');
|
||||
// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)
|
||||
_createRadioElement: function (name, checked) {
|
||||
|
||||
var input = document.createElement('input');
|
||||
if (!obj.overlay) {
|
||||
input.name = 'leaflet-base-layers';
|
||||
var radioHtml = '<input type="radio" name="' + name + '"';
|
||||
if (checked) {
|
||||
radioHtml += ' checked="checked"';
|
||||
}
|
||||
input.type = obj.overlay ? 'checkbox' : 'radio';
|
||||
radioHtml += '/>';
|
||||
|
||||
var radioFragment = document.createElement('div');
|
||||
radioFragment.innerHTML = radioHtml;
|
||||
|
||||
return radioFragment.firstChild;
|
||||
},
|
||||
|
||||
_addItem: function (obj) {
|
||||
var label = document.createElement('label'),
|
||||
input,
|
||||
checked = this._map.hasLayer(obj.layer);
|
||||
|
||||
if (obj.overlay) {
|
||||
input = document.createElement('input');
|
||||
input.type = 'checkbox';
|
||||
input.defaultChecked = checked;
|
||||
} else {
|
||||
input = this._createRadioElement('leaflet-base-layers', checked);
|
||||
}
|
||||
|
||||
input.layerId = L.Util.stamp(obj.layer);
|
||||
input.defaultChecked = this._map.hasLayer(obj.layer);
|
||||
|
||||
L.DomEvent.on(input, 'click', this._onInputClick, this);
|
||||
|
||||
|
@ -26,7 +26,11 @@ L.FeatureGroup = L.LayerGroup.extend({
|
||||
|
||||
L.LayerGroup.prototype.removeLayer.call(this, layer);
|
||||
|
||||
return this.invoke('unbindPopup');
|
||||
if (this._popupContent) {
|
||||
return this.invoke('unbindPopup');
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
bindPopup: function (content) {
|
||||
|
Loading…
Reference in New Issue
Block a user