From a0881fb5d7341290a66af793ba129e9c75a1bd12 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 5 Oct 2014 18:49:36 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D0=B2=D0=B8=D0=B3=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=81=20=D0=BF=D0=BE=D0=BC=D0=BE=D1=89=D1=8E=20?= =?UTF-8?q?history=20-=20little=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 15a3552..f5dc66d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -138,16 +138,7 @@ window.addEventListener('popstate', function(e) lng = e.state.lng; zoom = e.state.zoom; - cLat = myMap.getCenter().lat; - cLng = myMap.getCenter().lng; - cZoom = myMap.getZoom(); - - if (lat != cLat || lng != cLng || zoom != cZoom) - { - myMap.setView([lat, lng], zoom); - } else { - window.history.go(-1); - } + myMap.setView([lat, lng], zoom); } else if (e.state.hasOwnProperty('route')) {