Skip to content

Commit

Permalink
fix pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
devvmh authored and Connoropolous committed Mar 4, 2017
1 parent f181827 commit 5bdc792
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/Metamaps/Visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,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)
Expand All @@ -167,7 +167,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)
Expand Down

0 comments on commit 5bdc792

Please sign in to comment.