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 Jul 31, 2012
1 parent 7622bfe commit a393cde
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,8 +7,12 @@ Leaflet Changelog

An in-progress version being developed on the master branch.

## 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)
* Fixed a bug with incorrect calculation of scale by the scale control. [#852](https://github.com/CloudMade/Leaflet/issues/852)
* Fixed broken L.tileLayer.wms class factory (by [@mattcurrie](https://github.com/mattcurrie)). [#856](https://github.com/CloudMade/Leaflet/issues/856)
* Improved retina detection for `TileLayer` `detectRetina` option (by [@sxua](https://github.com/sxua)). [#854](https://github.com/CloudMade/Leaflet/issues/854)

## 0.4 (July 30, 2012)

Expand Down
14 changes: 9 additions & 5 deletions dist/leaflet-src.js
Expand Up @@ -21,7 +21,7 @@ if (typeof exports !== undefined + '') {
window.L = L;
}

L.version = '0.4';
L.version = '0.4.1';


/*
Expand Down Expand Up @@ -382,6 +382,8 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
return supported;
}());

var retina = (('devicePixelRatio' in window && window.devicePixelRatio > 1) || ('matchMedia' in window && window.matchMedia("(min-resolution:144dpi)").matches));

L.Browser = {
ua: ua,
ie: ie,
Expand All @@ -405,7 +407,9 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
mobileWebkit3d: mobile && webkit3d,
mobileOpera: mobile && opera,

touch: touch
touch: touch,

retina: retina
};
}());

Expand Down Expand Up @@ -1890,7 +1894,7 @@ L.TileLayer = L.Class.extend({
options = L.Util.setOptions(this, options);

// detecting retina displays, adjusting tileSize and zoom levels
if (options.detectRetina && window.devicePixelRatio > 1 && options.maxZoom > 0) {
if (options.detectRetina && L.Browser.retina && options.maxZoom > 0) {

options.tileSize = Math.floor(options.tileSize / 2);
options.zoomOffset++;
Expand Down Expand Up @@ -2398,7 +2402,7 @@ L.TileLayer.WMS = L.TileLayer.extend({

var wmsParams = L.Util.extend({}, this.defaultWmsParams);

if (options.detectRetina && window.devicePixelRatio > 1) {
if (options.detectRetina && L.Browser.retina) {
wmsParams.width = wmsParams.height = this.options.tileSize * 2;
} else {
wmsParams.width = wmsParams.height = this.options.tileSize;
Expand Down Expand Up @@ -2456,7 +2460,7 @@ L.TileLayer.WMS = L.TileLayer.extend({
});

L.tileLayer.wms = function (url, options) {
return new L.TileLayer(url, options);
return new L.TileLayer.WMS(url, options);
};


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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Leaflet.js
Expand Up @@ -14,4 +14,4 @@ if (typeof exports !== undefined + '') {
window.L = L;
}

L.version = '0.4';
L.version = '0.4.1';

0 comments on commit a393cde

Please sign in to comment.