[Pkg-javascript-commits] [leaflet] 252/301: proper rounding of max bounds offsets

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 507e6c7aa5bbbabf68ab5f1e63fdf3cb8151e4e4
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Thu Nov 14 17:52:31 2013 +0200

    proper rounding of max bounds offsets
---
 src/map/Map.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/map/Map.js b/src/map/Map.js
index ba9c6d4..0085f40 100644
--- a/src/map/Map.js
+++ b/src/map/Map.js
@@ -789,7 +789,9 @@ L.Map = L.Class.extend({
 	},
 
 	_rebound: function (left, right) {
-		return Math.round(left + right > 0 ? (left - right) / 2 : Math.max(0, left) - Math.max(0, right));
+		return left + right > 0 ?
+			Math.round(left - right) / 2 :
+			Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));
 	},
 
 	_limitZoom: function (zoom) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list