Skip to content

Commit 4cdece7

Browse files
committed
update build and changelog
2 parents b3d6427 + 2020827 commit 4cdece7

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ An in-progress version being developed on the master branch.
99

1010
* Added optional `animate` argument to `Map` `invalidateSize` (by [@ajbeaven](https://github.com/ajbeaven)). [#857](https://github.com/CloudMade/Leaflet/pull/857)
1111

12+
## 0.4.2 (August 1, 2012)
13+
14+
* 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)
15+
* 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)
16+
1217
## 0.4.1 (July 31, 2012)
1318

1419
* Fixed a bug that caused marker shadows appear as opaque black in IE6-8. [#850](https://github.com/CloudMade/Leaflet/issues/850)

dist/leaflet-src.js

+31-8
Original file line numberDiff line numberDiff line change
@@ -3516,7 +3516,11 @@ L.FeatureGroup = L.LayerGroup.extend({
35163516

35173517
L.LayerGroup.prototype.removeLayer.call(this, layer);
35183518

3519-
return this.invoke('unbindPopup');
3519+
if (this._popupContent) {
3520+
return this.invoke('unbindPopup');
3521+
} else {
3522+
return this;
3523+
}
35203524
},
35213525

35223526
bindPopup: function (content) {
@@ -6928,16 +6932,35 @@ L.Control.Layers = L.Control.extend({
69286932
this._separator.style.display = (overlaysPresent && baseLayersPresent ? '' : 'none');
69296933
},
69306934

6931-
_addItem: function (obj, onclick) {
6932-
var label = document.createElement('label');
6935+
// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)
6936+
_createRadioElement: function (name, checked) {
69336937

6934-
var input = document.createElement('input');
6935-
if (!obj.overlay) {
6936-
input.name = 'leaflet-base-layers';
6938+
var radioHtml = '<input type="radio" name="' + name + '"';
6939+
if (checked) {
6940+
radioHtml += ' checked="checked"';
69376941
}
6938-
input.type = obj.overlay ? 'checkbox' : 'radio';
6942+
radioHtml += '/>';
6943+
6944+
var radioFragment = document.createElement('div');
6945+
radioFragment.innerHTML = radioHtml;
6946+
6947+
return radioFragment.firstChild;
6948+
},
6949+
6950+
_addItem: function (obj) {
6951+
var label = document.createElement('label'),
6952+
input,
6953+
checked = this._map.hasLayer(obj.layer);
6954+
6955+
if (obj.overlay) {
6956+
input = document.createElement('input');
6957+
input.type = 'checkbox';
6958+
input.defaultChecked = checked;
6959+
} else {
6960+
input = this._createRadioElement('leaflet-base-layers', checked);
6961+
}
6962+
69396963
input.layerId = L.Util.stamp(obj.layer);
6940-
input.defaultChecked = this._map.hasLayer(obj.layer);
69416964

69426965
L.DomEvent.on(input, 'click', this._onInputClick, this);
69436966

dist/leaflet.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)