fix marker shadow not zoom animating after setIcon, close #1768

This commit is contained in:
Vladimir Agafonkin 2013-07-10 19:34:51 +03:00
parent 1781cda04a
commit 001f975b22
2 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,7 @@ An in-progress version being developed on the `stable` branch.
* Fixed a regression with `worldCopyJump: true` breaking the map on small zoom levels (by [@danzel](https://github.com/danzel)). [#1831](https://github.com/Leaflet/Leaflet/issues/1831) * Fixed a regression with `worldCopyJump: true` breaking the map on small zoom levels (by [@danzel](https://github.com/danzel)). [#1831](https://github.com/Leaflet/Leaflet/issues/1831)
* Fixed a bug where `TileLayer.Canvas` wasn't immediately redrawn when `redraw` is called (by [@tofferrosen](https://github.com/tofferrosen)). [#1797](https://github.com/Leaflet/Leaflet/issues/1797) [#1817](https://github.com/Leaflet/Leaflet/issues/1817) * Fixed a bug where `TileLayer.Canvas` wasn't immediately redrawn when `redraw` is called (by [@tofferrosen](https://github.com/tofferrosen)). [#1797](https://github.com/Leaflet/Leaflet/issues/1797) [#1817](https://github.com/Leaflet/Leaflet/issues/1817)
* Fixed a bug where `GeoJSON` ignored non-feature geometries passed in an array. [#1840](https://github.com/Leaflet/Leaflet/issues/1840) * Fixed a bug where `GeoJSON` ignored non-feature geometries passed in an array. [#1840](https://github.com/Leaflet/Leaflet/issues/1840)
* Fixed a regression where `Marker` shadow didn't animate on zoom after using `setIcon`. [#1768](https://github.com/Leaflet/Leaflet/issues/1768)
## 0.6.2 (June 28, 2013) ## 0.6.2 (June 28, 2013)

View File

@ -142,11 +142,11 @@ L.Marker = L.Class.extend({
if (newShadow !== this._shadow) { if (newShadow !== this._shadow) {
this._removeShadow(); this._removeShadow();
addShadow = true; addShadow = true;
}
if (newShadow) { if (newShadow) {
L.DomUtil.addClass(newShadow, classToAdd); L.DomUtil.addClass(newShadow, classToAdd);
} }
}
this._shadow = newShadow; this._shadow = newShadow;