update leaflet to 0.7.2

This commit is contained in:
Jon Atkins 2014-01-22 19:19:52 +00:00
parent db605bcd5c
commit 9b9bf5b671
2 changed files with 11 additions and 22 deletions

View File

@ -7,7 +7,7 @@
var oldL = window.L, var oldL = window.L,
L = {}; L = {};
L.version = '0.7.1'; L.version = '0.7.2';
// define Leaflet for Node module pattern loaders, including Browserify // define Leaflet for Node module pattern loaders, including Browserify
if (typeof module === 'object' && typeof module.exports === 'object') { if (typeof module === 'object' && typeof module.exports === 'object') {
@ -2895,7 +2895,7 @@ L.TileLayer = L.Class.extend({
_getWrapTileNum: function () { _getWrapTileNum: function () {
var crs = this._map.options.crs, var crs = this._map.options.crs,
size = crs.getSize(this._map.getZoom()); size = crs.getSize(this._map.getZoom());
return size.divideBy(this.options.tileSize); return size.divideBy(this._getTileSize())._floor();
}, },
_adjustTilePoint: function (tilePoint) { _adjustTilePoint: function (tilePoint) {
@ -6529,26 +6529,15 @@ L.DomEvent = {
}, },
getMousePosition: function (e, container) { getMousePosition: function (e, container) {
var body = document.body,
docEl = document.documentElement,
//gecko makes scrollLeft more negative as you scroll in rtl, other browsers don't
//ref: https://code.google.com/p/closure-library/source/browse/closure/goog/style/bidi.js
x = L.DomUtil.documentIsLtr() ?
(e.pageX ? e.pageX - body.scrollLeft - docEl.scrollLeft : e.clientX) :
(L.Browser.gecko ? e.pageX - body.scrollLeft - docEl.scrollLeft :
e.pageX ? e.pageX - body.scrollLeft + docEl.scrollLeft : e.clientX),
y = e.pageY ? e.pageY - body.scrollTop - docEl.scrollTop: e.clientY,
pos = new L.Point(x, y);
if (!container) { if (!container) {
return pos; return new L.Point(e.clientX, e.clientY);
} }
var rect = container.getBoundingClientRect(), var rect = container.getBoundingClientRect();
left = rect.left - container.clientLeft,
top = rect.top - container.clientTop;
return pos._subtract(new L.Point(left, top)); return new L.Point(
e.clientX - rect.left - container.clientLeft,
e.clientY - rect.top - container.clientTop);
}, },
getWheelDelta: function (e) { getWheelDelta: function (e) {

8
external/leaflet.js vendored

File diff suppressed because one or more lines are too long