Skip to content

Commit

Permalink
Upgrade to Leaflet 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Feb 3, 2014
1 parent ed39a42 commit e8672a3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CHANGELOG
0.10.1 (unreleased)
-------------------

- Nothing changed yet.
* Upgrade to Leaflet 0.7.2


0.10.0 (2014-01-22)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*django-leaflet* allows you to use `Leaflet <http://leafletjs.com>`_
in your `Django <https://www.djangoproject.com>`_ projects.

It embeds Leaflet in version *0.7.1*.
It embeds Leaflet in version *0.7.2*.

.. image:: https://pypip.in/v/django-leaflet/badge.png
:target: https://pypi.python.org/pypi/django-leaflet
Expand Down
25 changes: 7 additions & 18 deletions leaflet/static/leaflet/leaflet-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var oldL = window.L,
L = {};

L.version = '0.7.1';
L.version = '0.7.2';

// define Leaflet for Node module pattern loaders, including Browserify
if (typeof module === 'object' && typeof module.exports === 'object') {
Expand Down Expand Up @@ -2895,7 +2895,7 @@ L.TileLayer = L.Class.extend({
_getWrapTileNum: function () {
var crs = this._map.options.crs,
size = crs.getSize(this._map.getZoom());
return size.divideBy(this.options.tileSize);
return size.divideBy(this._getTileSize())._floor();
},

_adjustTilePoint: function (tilePoint) {
Expand Down Expand Up @@ -6529,26 +6529,15 @@ L.DomEvent = {
},

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) {
return pos;
return new L.Point(e.clientX, e.clientY);
}

var rect = container.getBoundingClientRect(),
left = rect.left - container.clientLeft,
top = rect.top - container.clientTop;
var rect = container.getBoundingClientRect();

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) {
Expand Down
8 changes: 4 additions & 4 deletions leaflet/static/leaflet/leaflet.js

Large diffs are not rendered by default.

0 comments on commit e8672a3

Please sign in to comment.