Skip to content

Commit

Permalink
fix(visualize): Deep linking no longer messes up back history
Browse files Browse the repository at this point in the history
Fixes #255.

Also fixes #249
  • Loading branch information
atruskie committed Feb 15, 2016
1 parent e35d105 commit a382feb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ angular.module("baw",
controller: "VisualizeController",
title: "Visualize audio distribution",
fullWidth: true,
reloadOnSearch: false
reloadOnSearch: false
}).

// missing route page
Expand Down
8 changes: 5 additions & 3 deletions src/app/visualize/visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ angular

var updateLocationSearch = _.throttle(function (newExtent) {
//console.debug(...newExtent);

$location.replace();
$location.search({
[$scope.filterType]: $routeParams[$scope.filterType],
[extent0Key]: +newExtent[0],
[extent1Key]: +newExtent[1]
[$scope.filterType]: $routeParams[$scope.filterType],
[extent0Key]: +newExtent[0],
[extent1Key]: +newExtent[1]
});
}, 250);

Expand Down

0 comments on commit a382feb

Please sign in to comment.