From 70923e6604638a0d84ba6b4b2a15def3396a17b4 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 30 Jul 2014 17:40:44 +0300 Subject: [PATCH] rename zoomPanTo to flyTo --- build/deps.js | 2 +- debug/map/zoompan.html | 8 ++++---- src/map/anim/{Map.ZoomPan.js => Map.FlyTo.js} | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/map/anim/{Map.ZoomPan.js => Map.FlyTo.js} (96%) diff --git a/build/deps.js b/build/deps.js index cfaba778..87d5934f 100644 --- a/build/deps.js +++ b/build/deps.js @@ -237,7 +237,7 @@ var deps = { AnimationZoom: { src: [ 'map/anim/Map.ZoomAnimation.js', - 'map/anim/Map.ZoomPan.js' + 'map/anim/Map.FlyTo.js' ], deps: ['AnimationPan'], desc: 'Smooth zooming animation. Works only on browsers that support CSS3 Transitions.' diff --git a/debug/map/zoompan.html b/debug/map/zoompan.html index 2881e1d1..3016a1dd 100644 --- a/debug/map/zoompan.html +++ b/debug/map/zoompan.html @@ -49,11 +49,11 @@ // marker3 = L.marker(dc).addTo(map), // marker4 = L.marker(sf).addTo(map); - document.getElementById('dc').onclick = function () { map.zoomPanTo(dc, 10); }; - document.getElementById('sf').onclick = function () { map.zoomPanTo(sf, 10); }; + document.getElementById('dc').onclick = function () { map.flyTo(dc, 10); }; + document.getElementById('sf').onclick = function () { map.flyTo(sf, 10); }; document.getElementById('stop').onclick = function () { map.stop(); }; - // document.getElementById('london').onclick = function () { map.zoomPanTo(london); }; - // document.getElementById('kyiv').onclick = function () { map.zoomPanTo(kyiv); }; + // document.getElementById('london').onclick = function () { map.flyTo(london); }; + // document.getElementById('kyiv').onclick = function () { map.flyTo(kyiv); }; function logEvent(e) { console.log(e.type); } diff --git a/src/map/anim/Map.ZoomPan.js b/src/map/anim/Map.FlyTo.js similarity index 96% rename from src/map/anim/Map.ZoomPan.js rename to src/map/anim/Map.FlyTo.js index 6b76af20..156d1213 100644 --- a/src/map/anim/Map.ZoomPan.js +++ b/src/map/anim/Map.FlyTo.js @@ -1,6 +1,6 @@ L.Map.include({ - zoomPanTo: function (targetCenter, targetZoom) { + flyTo: function (targetCenter, targetZoom) { this.stop();