From d664f74832276af46b9ba211d51ece12f2688175 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 21 Mar 2017 14:20:25 -0400 Subject: [PATCH] When changing selection, always update the url hash --- modules/behavior/hash.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/behavior/hash.js b/modules/behavior/hash.js index 6849aa6c3..5c54b69a2 100644 --- a/modules/behavior/hash.js +++ b/modules/behavior/hash.js @@ -28,20 +28,17 @@ export function behaviorHash(context) { q = _.omit(utilStringQs(window.location.hash.substring(1)), 'comment'), newParams = {}; - if (mode && mode.id === 'browse') { - delete q.id; - } else { - var selected = context.selectedIDs().filter(function(id) { - return !context.entity(id).isNew(); - }); - if (selected.length) { - newParams.id = selected.join(','); - } + delete q.id; + var selected = context.selectedIDs().filter(function(id) { + return !context.entity(id).isNew(); + }); + if (selected.length) { + newParams.id = selected.join(','); } newParams.map = zoom.toFixed(2) + - '/' + center[1].toFixed(precision) + - '/' + center[0].toFixed(precision); + '/' + center[1].toFixed(precision) + + '/' + center[0].toFixed(precision); return '#' + utilQsString(_.assign(q, newParams), true); };