update changelog and build

This commit is contained in:
Vladimir Agafonkin 2012-11-14 14:08:20 +02:00
parent 91aecd376b
commit 93091704f7
3 changed files with 29 additions and 8 deletions

View File

@ -34,6 +34,7 @@ An in-progress version being developed on the master branch.
* 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` `contextmenu` event. [#223](https://github.com/CloudMade/Leaflet/issues/223)
* Added `Map` `whenReady` method (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1063](https://github.com/CloudMade/Leaflet/pull/1063)
* Added `FeatureGroup` `layeradd` and `layerremove` events (by [@jacobtoye](https://github.com/jacobtoye)). [#1122](https://github.com/CloudMade/Leaflet/issues/1122)
* Added `Control.Layers` `baselayerchange` event (by [@jfirebaugh](https://github.com/jfirebaugh)). [#1064](https://github.com/CloudMade/Leaflet/pull/1064)
@ -41,6 +42,7 @@ An in-progress version being developed on the master branch.
* Removed `Browser` `ua`, `ie`, `gecko`, `opera` properties (no longer needed).
* Added `CRS.Simple` to the list of built-in CRS. It was added earlier but not included in the build.
* Added `L.extend`, `L.bind`, `L.stamp`, `L.setOptions` shortcuts for corresponding `L.Util` methods.
* Added `Point` `equals` method.
### Bugfixes
@ -48,7 +50,7 @@ An in-progress version being developed on the master branch.
* Fixed broken tiles and zooming in RTL layouts (by [@danzel](https://github.com/danzel)). [#1099](https://github.com/CloudMade/Leaflet/pull/1099) [#1095](https://github.com/CloudMade/Leaflet/issues/1095)
* Fixed a bug with pan animation where it jumped to its end position if you tried to drag the map.
* Fixed a bug with shift-clicking on a zoom button leading to unexpected result.
* Fixed a bug where shift-clicking on a map would zoom it to the max zoom level.
* Fixed a glitch with zooming in while panning animation is running.
* Fixed a glitch with dragging the map while zoom animation is running.

31
dist/leaflet-src.js vendored
View File

@ -526,6 +526,11 @@ L.Point.prototype = {
return Math.sqrt(x * x + y * y);
},
equals: function (point) {
return point.x === this.x &&
point.y === this.y;
},
toString: function () {
return 'Point(' +
L.Util.formatNum(this.x) + ', ' +
@ -3094,12 +3099,13 @@ L.Marker = L.Class.extend({
},
_initInteraction: function () {
if (!this.options.clickable) {
return;
}
if (!this.options.clickable) { return; }
// TODO refactor into something shared with Map/Path/etc. to DRY it up
var icon = this._icon,
events = ['dblclick', 'mousedown', 'mouseover', 'mouseout'];
events = ['dblclick', 'mousedown', 'mouseover', 'mouseout', 'contextmenu'];
L.DomUtil.addClass(icon, 'leaflet-clickable');
L.DomEvent.on(icon, 'click', this._onMouseClick, this);
@ -3119,20 +3125,31 @@ L.Marker = L.Class.extend({
_onMouseClick: function (e) {
var wasDragged = this.dragging && this.dragging.moved();
if (this.hasEventListeners(e.type) || wasDragged) {
L.DomEvent.stopPropagation(e);
}
if (wasDragged) { return; }
if (this._map.dragging && this._map.dragging.moved()) { return; }
this.fire(e.type, {
originalEvent: e
});
},
_fireMouseEvent: function (e) {
this.fire(e.type, {
originalEvent: e
});
// TODO proper custom event propagation
// this line will always be called if marker is in a FeatureGroup
if (e.type === 'contextmenu' && this.hasEventListeners(e.type)) {
L.DomEvent.preventDefault(e);
}
if (e.type !== 'mousedown') {
L.DomEvent.stopPropagation(e);
}
@ -6469,9 +6486,11 @@ L.Map.BoxZoom = L.Handler.extend({
.off(document, 'mouseup', this._onMouseUp);
var map = this._map,
layerPoint = map.mouseEventToLayerPoint(e),
layerPoint = map.mouseEventToLayerPoint(e);
bounds = new L.LatLngBounds(
if (this._startLayerPoint.equals(layerPoint)) { return; }
var bounds = new L.LatLngBounds(
map.layerPointToLatLng(this._startLayerPoint),
map.layerPointToLatLng(layerPoint));

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long