From 2c57cff27fe1ea36d3f6466b90d5da3906755941 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 25 Mar 2015 15:07:43 +0100 Subject: [PATCH] don't push history on initial reset() --- lib/main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index ea4727a..9171cae 100644 --- a/lib/main.js +++ b/lib/main.js @@ -111,7 +111,7 @@ require(["map", "infobox/main"], function (Map, Infobox) { historyDict.links[linkId(d)] = d }) - gotoAnything.reset() + gotoAnything.reset(false) gotoHistory(gotoAnything, historyDict, window.location.hash) @@ -326,12 +326,15 @@ require(["map", "infobox/main"], function (Map, Infobox) { var infobox - function resetView() { + function resetView(push) { + push = trueDefault(push) + targets.forEach( function (t) { t.resetView() }) - pushHistory() + if (push) + pushHistory() } function gotoNode(d, showMap, push) {