update changelog and build
This commit is contained in:
parent
e74fc2594e
commit
1eca103f8a
@ -25,8 +25,8 @@ An in-progress version being developed on the master branch.
|
||||
* Improved zoom behavior so that there's no drift of coordinates when you change zoom back and forth without panning. [#426](https://github.com/Leaflet/Leaflet/issues/426)
|
||||
* Improved double click behavior to zoom while keeping the clicked point fixed (by [@ansis](https://github.com/ansis)). [#1582](https://github.com/Leaflet/Leaflet/issues/1582)
|
||||
* Improved attribution control to be much less obtrusive (no "powered by", just a Leaflet link). You can still remove the prefix with `map.attributionControl.setPrefix('')` if you need.
|
||||
* Improved dragging behavior to not get stuck if mouse moved outside of an iframe containing the map (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1277](https://github.com/Leaflet/Leaflet/issues/1277) [#1782](https://github.com/Leaflet/Leaflet/issues/1782) [#1786](https://github.com/Leaflet/Leaflet/issues/1786)
|
||||
* Improved box zoom to be cancelable by pressing Escape (by [@yohanboniface](https://github.com/yohanboniface)). [#1438](https://github.com/Leaflet/Leaflet/issues/1438)
|
||||
* Improved paths with `clickable: false` to allow mouse events to pass through to objects underneath (by [@snkashis](https://github.com/snkashis)). [#1384](https://github.com/Leaflet/Leaflet/pull/1384) [#1281](https://github.com/Leaflet/Leaflet/issues/1281)
|
||||
* Improved `Marker` popups to close on marker click if opened (by [@popox](https://github.com/popox)). [#1761](https://github.com/Leaflet/Leaflet/issues/1761)
|
||||
|
||||
#### API improvements
|
||||
@ -63,6 +63,7 @@ An in-progress version being developed on the master branch.
|
||||
* Added `Marker` `togglePopup` method (by [@popox](https://github.com/popox)). [#1761](https://github.com/Leaflet/Leaflet/issues/1761)
|
||||
* Added `Popup` `closeOnClick` option that overrides the same `Map` option for specific popups (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1669](https://github.com/Leaflet/Leaflet/issues/1669)
|
||||
* Added `TileLayer.WMS` `crs` option to be able to use WMS of CRS other than the map CRS (by [@kengu](https://github.com/kengu)). [#942](https://github.com/Leaflet/Leaflet/issues/942) [#945](https://github.com/Leaflet/Leaflet/issues/945)
|
||||
* Improved paths with `clickable: false` to allow mouse events to pass through to objects underneath (by [@snkashis](https://github.com/snkashis)). [#1384](https://github.com/Leaflet/Leaflet/pull/1384) [#1281](https://github.com/Leaflet/Leaflet/issues/1281)
|
||||
|
||||
##### Map API improvements
|
||||
|
||||
|
66
dist/leaflet-src.js
vendored
66
dist/leaflet-src.js
vendored
@ -1092,24 +1092,48 @@ L.DomUtil.TRANSITION_END =
|
||||
var userSelectProperty = L.DomUtil.testProp(
|
||||
['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);
|
||||
|
||||
L.DomUtil.disableTextSelection = function () {
|
||||
if (userSelectProperty) {
|
||||
var style = document.documentElement.style;
|
||||
this._userSelect = style[userSelectProperty];
|
||||
style[userSelectProperty] = 'none';
|
||||
} else {
|
||||
L.DomEvent.on(window, 'selectstart', L.DomEvent.stop);
|
||||
}
|
||||
};
|
||||
var userDragProperty = L.DomUtil.testProp(
|
||||
['userDrag', 'WebkitUserDrag', 'OUserDrag', 'MozUserDrag', 'msUserDrag']);
|
||||
|
||||
L.DomUtil.enableTextSelection = function () {
|
||||
if (userSelectProperty) {
|
||||
document.documentElement.style[userSelectProperty] = this._userSelect;
|
||||
delete this._userSelect;
|
||||
} else {
|
||||
L.DomEvent.off(window, 'selectstart', L.DomEvent.stop);
|
||||
L.extend(L.DomUtil, {
|
||||
disableTextSelection: function () {
|
||||
if (userSelectProperty) {
|
||||
var style = document.documentElement.style;
|
||||
this._userSelect = style[userSelectProperty];
|
||||
style[userSelectProperty] = 'none';
|
||||
} else {
|
||||
L.DomEvent.on(window, 'selectstart', L.DomEvent.stop);
|
||||
}
|
||||
},
|
||||
|
||||
enableTextSelection: function () {
|
||||
if (userSelectProperty) {
|
||||
document.documentElement.style[userSelectProperty] = this._userSelect;
|
||||
delete this._userSelect;
|
||||
} else {
|
||||
L.DomEvent.off(window, 'selectstart', L.DomEvent.stop);
|
||||
}
|
||||
},
|
||||
|
||||
disableImageDrag: function () {
|
||||
if (userDragProperty) {
|
||||
var style = document.documentElement.style;
|
||||
this._userDrag = style[userDragProperty];
|
||||
style[userDragProperty] = 'none';
|
||||
} else {
|
||||
L.DomEvent.on(window, 'dragstart', L.DomEvent.stop);
|
||||
}
|
||||
},
|
||||
|
||||
enableImageDrag: function () {
|
||||
if (userDragProperty) {
|
||||
document.documentElement.style[userDragProperty] = this._userDrag;
|
||||
delete this._userDrag;
|
||||
} else {
|
||||
L.DomEvent.off(window, 'dragstart', L.DomEvent.stop);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
@ -6416,11 +6440,12 @@ L.Draggable = L.Class.extend({
|
||||
if (e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }
|
||||
|
||||
L.DomEvent
|
||||
.preventDefault(e)
|
||||
.stopPropagation(e);
|
||||
|
||||
if (L.Draggable._disabled) { return; }
|
||||
|
||||
L.DomUtil.disableImageDrag();
|
||||
|
||||
var first = e.touches ? e.touches[0] : e,
|
||||
el = first.target;
|
||||
|
||||
@ -6489,6 +6514,8 @@ L.Draggable = L.Class.extend({
|
||||
.off(document, L.Draggable.END[i], this._onUp);
|
||||
}
|
||||
|
||||
L.DomUtil.enableImageDrag();
|
||||
|
||||
if (this._moved) {
|
||||
// ensure drag is not fired after dragend
|
||||
L.Util.cancelAnimFrame(this._animRequest);
|
||||
@ -7277,6 +7304,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
||||
if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }
|
||||
|
||||
L.DomUtil.disableTextSelection();
|
||||
L.DomUtil.disableImageDrag();
|
||||
|
||||
this._startLayerPoint = this._map.mouseEventToLayerPoint(e);
|
||||
|
||||
@ -7289,8 +7317,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
||||
L.DomEvent
|
||||
.on(document, 'mousemove', this._onMouseMove, this)
|
||||
.on(document, 'mouseup', this._onMouseUp, this)
|
||||
.on(document, 'keydown', this._onKeyDown, this)
|
||||
.preventDefault(e);
|
||||
.on(document, 'keydown', this._onKeyDown, this);
|
||||
|
||||
this._map.fire('boxzoomstart');
|
||||
},
|
||||
@ -7318,6 +7345,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
||||
this._container.style.cursor = '';
|
||||
|
||||
L.DomUtil.enableTextSelection();
|
||||
L.DomUtil.enableImageDrag();
|
||||
|
||||
L.DomEvent
|
||||
.off(document, 'mousemove', this._onMouseMove)
|
||||
|
8
dist/leaflet.js
vendored
8
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user