From: Mitch S. <mit...@be...> - 2009-08-18 18:31:11
|
On 08/18/2009 11:09 AM, Ian Holmes wrote: > Since the "embedder" in this case is the index.html file, which > extracts the parameters from the URL, presumably the natural way to do > this is to add a "Bookmark" link to the index.html file, that extracts > the 'loc' and 'tracks' params using the Browser's visibleTracks and > visibleRegion method? Certainly, that's one natural way to do it. But currently, the JBrowse-controlled HTML element takes up the whole viewport. So there's currently no place for the index.html file to put a "bookmark" link. I like it that way because it means that as much space as possible is dedicated to the actual genomic features, which I think is the right priority. If, say, we added a bookmark link above the JBrowse-controlled HTML element and made that HTML element smaller, then there would be a significant amount of wasted space at the top of the viewport (a big blank region to the side of the bookmark link). Plus, if the bookmarking user experience is the same in multiple embedders (say, click on a bookmark link, get a URL), then I think the UI should be the same regardless of embedder. All of which is to say: I think JBrowse (the embed-ee) should implement the UI. We could stick a button with a chain-link icon somewhere in the area where the navigation buttons (and the big trapezoid) are, say. And the embedder could pass a bookmark callback in to the Browser constructor that would take a Browser object as an argument and return a URL string (using the visibleTracks and visibleRegion methods). Then the embed-ee could take that callback and use it when the icon is clicked. We could also omit the icon if there was no bookmark callback passed in. Mitch |