don't push history on initial reset()

This commit is contained in:
Nils Schneider 2015-03-25 15:07:43 +01:00
parent 315012cfb7
commit 2c57cff27f

View file

@ -111,7 +111,7 @@ require(["map", "infobox/main"], function (Map, Infobox) {
historyDict.links[linkId(d)] = d historyDict.links[linkId(d)] = d
}) })
gotoAnything.reset() gotoAnything.reset(false)
gotoHistory(gotoAnything, historyDict, window.location.hash) gotoHistory(gotoAnything, historyDict, window.location.hash)
@ -326,12 +326,15 @@ require(["map", "infobox/main"], function (Map, Infobox) {
var infobox var infobox
function resetView() { function resetView(push) {
push = trueDefault(push)
targets.forEach( function (t) { targets.forEach( function (t) {
t.resetView() t.resetView()
}) })
pushHistory() if (push)
pushHistory()
} }
function gotoNode(d, showMap, push) { function gotoNode(d, showMap, push) {