Skip to content

Commit

Permalink
update build and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Aug 1, 2012
1 parent 690c969 commit 2020827
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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)
Expand Down
39 changes: 31 additions & 8 deletions dist/leaflet-src.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet.js

Large diffs are not rendered by default.

0 comments on commit 2020827

Please sign in to comment.