Files
galaxy/static/scripts/mvc/visualization.js
T

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);
}
});