update changelog and build
This commit is contained in:
parent
8077faa2e3
commit
3c7b66b56c
@ -26,6 +26,7 @@ An in-progress version being developed on the master branch.
|
|||||||
* Improved markers and vectors click event so that it propagates to map if no one is listening to it (by [@danzel](https://github.com/danzel)). [#834](https://github.com/CloudMade/Leaflet/issues/834) [#1033](https://github.com/CloudMade/Leaflet/pull/1033)
|
* Improved markers and vectors click event so that it propagates to map if no one is listening to it (by [@danzel](https://github.com/danzel)). [#834](https://github.com/CloudMade/Leaflet/issues/834) [#1033](https://github.com/CloudMade/Leaflet/pull/1033)
|
||||||
* Added `Path` `unbindPopup` method.
|
* Added `Path` `unbindPopup` method.
|
||||||
* Added `Path` `remove` event.
|
* Added `Path` `remove` event.
|
||||||
|
* Added `Marker` `riseOnHover` and `riseOffset` options (for bringing markers to front on hover, disabled by default) (by [jacobtoye](https://github.com/jacobtoye)). [#914](https://github.com/CloudMade/Leaflet/pull/914) [#920](https://github.com/CloudMade/Leaflet/issues/920)
|
||||||
* Added `Marker` `move` and `remove` events.
|
* Added `Marker` `move` and `remove` events.
|
||||||
* Added `Map` `whenReady` method (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1063](https://github.com/CloudMade/Leaflet/pull/1063)
|
* Added `Map` `whenReady` method (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1063](https://github.com/CloudMade/Leaflet/pull/1063)
|
||||||
* Added `Control.Layers` `baselayerchange` event (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1064](https://github.com/CloudMade/Leaflet/pull/1064)
|
* Added `Control.Layers` `baselayerchange` event (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1064](https://github.com/CloudMade/Leaflet/pull/1064)
|
||||||
|
33
dist/leaflet-src.js
vendored
33
dist/leaflet-src.js
vendored
@ -2904,7 +2904,9 @@ L.Marker = L.Class.extend({
|
|||||||
clickable: true,
|
clickable: true,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
zIndexOffset: 0,
|
zIndexOffset: 0,
|
||||||
opacity: 1
|
opacity: 1,
|
||||||
|
riseOnHover: false,
|
||||||
|
riseOffset: 250
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (latlng, options) {
|
initialize: function (latlng, options) {
|
||||||
@ -2998,7 +3000,14 @@ L.Marker = L.Class.extend({
|
|||||||
needOpacityUpdate = (this.options.opacity < 1);
|
needOpacityUpdate = (this.options.opacity < 1);
|
||||||
|
|
||||||
L.DomUtil.addClass(this._icon, classToAdd);
|
L.DomUtil.addClass(this._icon, classToAdd);
|
||||||
|
|
||||||
|
if (options.riseOnHover) {
|
||||||
|
L.DomEvent
|
||||||
|
.on(this._icon, 'mouseover', this._bringToFront, this)
|
||||||
|
.on(this._icon, 'mouseout', this._resetZIndex, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._shadow) {
|
if (!this._shadow) {
|
||||||
this._shadow = options.icon.createShadow();
|
this._shadow = options.icon.createShadow();
|
||||||
|
|
||||||
@ -3024,6 +3033,12 @@ L.Marker = L.Class.extend({
|
|||||||
_removeIcon: function () {
|
_removeIcon: function () {
|
||||||
var panes = this._map._panes;
|
var panes = this._map._panes;
|
||||||
|
|
||||||
|
if (this.options.riseOnHover) {
|
||||||
|
L.DomEvent
|
||||||
|
.off(this._icon, 'mouseover', this._bringToFront)
|
||||||
|
.off(this._icon, 'mouseout', this._resetZIndex);
|
||||||
|
}
|
||||||
|
|
||||||
panes.markerPane.removeChild(this._icon);
|
panes.markerPane.removeChild(this._icon);
|
||||||
|
|
||||||
if (this._shadow) {
|
if (this._shadow) {
|
||||||
@ -3040,7 +3055,13 @@ L.Marker = L.Class.extend({
|
|||||||
L.DomUtil.setPosition(this._shadow, pos);
|
L.DomUtil.setPosition(this._shadow, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._icon.style.zIndex = pos.y + this.options.zIndexOffset;
|
this._zIndex = pos.y + this.options.zIndexOffset;
|
||||||
|
|
||||||
|
this._resetZIndex();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateZIndex: function (offset) {
|
||||||
|
this._icon.style.zIndex = this._zIndex + offset;
|
||||||
},
|
},
|
||||||
|
|
||||||
_animateZoom: function (opt) {
|
_animateZoom: function (opt) {
|
||||||
@ -3105,6 +3126,14 @@ L.Marker = L.Class.extend({
|
|||||||
if (this._shadow) {
|
if (this._shadow) {
|
||||||
L.DomUtil.setOpacity(this._shadow, this.options.opacity);
|
L.DomUtil.setOpacity(this._shadow, this.options.opacity);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_bringToFront: function () {
|
||||||
|
this._updateZIndex(this.options.riseOffset);
|
||||||
|
},
|
||||||
|
|
||||||
|
_resetZIndex: function () {
|
||||||
|
this._updateZIndex(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user