mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
18 lines
527 B
JavaScript
18 lines
527 B
JavaScript
/**
|
|
* Router for track browser.
|
|
*/
|
|
var TrackBrowserRouter = Backbone.Router.extend({
|
|
initialize: function(options) {
|
|
this.view = options.view;
|
|
|
|
// Can't put regular expression in routes dictionary.
|
|
// NOTE: parentheses are used to denote parameters returned to callback.
|
|
this.route(/([\w]+)$/, 'change_location');
|
|
this.route(/([\w]+\:[\d,]+-[\d,]+)$/, 'change_location');
|
|
},
|
|
|
|
change_location: function(new_loc) {
|
|
this.view.go_to(new_loc);
|
|
}
|
|
});
|