Adding the constructor
We're now ready to add the JBrowse Linear View constructor to "index.html".
Try it out!
You've embedded JBrowse Linear View in a web page! Now try it out. You can open the track selector by clicking "SELECT TRACKS" or by clicking on the icon on the far left of the navigation area. You can pan with the arrow buttons or click and drag to move around. You can change chromosome, enter a location to navigate to, and zoom in and out. There's also a menu button in the top left of the view that has other display options.
Controlling the view
Any action taken in the UI can also be performed programmatically. An instance of JBrowseLinearView has an attribute called "view" that can be used to control the state of the view. As an example, we will add some buttons on the page that navigate to the locations of a couple of genes.
Modify "index.html" so that it looks like the following:
Now you can navigate to a gene just by clicking one of the buttons