From e0eb3e63339819e6f54ed8267e20618edbaa9780 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 31 Dec 2016 12:07:53 -0500 Subject: [PATCH] fix pathname --- frontend/src/Metamaps/Visualize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Metamaps/Visualize.js b/frontend/src/Metamaps/Visualize.js index ea337ba2..d2cf576b 100644 --- a/frontend/src/Metamaps/Visualize.js +++ b/frontend/src/Metamaps/Visualize.js @@ -153,7 +153,7 @@ const Visualize = { const oldScale = self.mGraph.canvas.scale const cachedPathname = window.location.pathname const updateScaleInUrl = debounce(() => { - Util.updateQueryParams({ scale: self.mGraph.canvas.scaleOffsetX.toFixed(2) }, pathname) + Util.updateQueryParams({ scale: self.mGraph.canvas.scaleOffsetX.toFixed(2) }, cachedPathname) }, 200) self.mGraph.canvas.scale = function(x, y, disablePlot) { const returnValue = oldScale.apply(self.mGraph.canvas, arguments) @@ -166,7 +166,7 @@ const Visualize = { const updateTranslateInUrl = debounce(() => { const newX = self.mGraph.canvas.translateOffsetX.toFixed(2) const newY = self.mGraph.canvas.translateOffsetY.toFixed(2) - Util.updateQueryParams({ translate: `${newX},${newY}` }, pathname) + Util.updateQueryParams({ translate: `${newX},${newY}` }, cachedPathname) }, 200) self.mGraph.canvas.translate = function(x, y, disablePlot) { const returnValue = oldTranslate.apply(self.mGraph.canvas, arguments)