projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07082c3
)
Update map state when following a client side route
author
Tom Hughes
<tom@compton.nu>
Thu, 13 Mar 2014 13:37:45 +0000
(13:37 +0000)
committer
Tom Hughes
<tom@compton.nu>
Thu, 13 Mar 2014 13:37:45 +0000
(13:37 +0000)
app/assets/javascripts/router.js
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/router.js
b/app/assets/javascripts/router.js
index 9657549b1abdb893c304049b76ec894038a21402..ab206410703e81a4db32cecf914551d539b9e535 100644
(file)
--- a/
app/assets/javascripts/router.js
+++ b/
app/assets/javascripts/router.js
@@
-114,7
+114,9
@@
OSM.Router = function(map, rts) {
route = routes.recognize(path);
if (!route) return false;
currentRoute.run('unload');
- window.history.pushState(OSM.parseHash(url), document.title, url);
+ var state = OSM.parseHash(url);
+ map.setState(state);
+ window.history.pushState(state, document.title, url);
currentPath = path;
currentRoute = route;
currentRoute.run('pushstate', currentPath);