dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

Small feature request: full screen #55

Closed yhoogstrate closed 8 years ago

yhoogstrate commented 10 years ago

I'm not sure if this has been discussed before or whether I can't find the button, but to me it would be useful to have a "full screen" button at the BioDalliance home page. With full screen I mean that the viewer takes the entire browsers width.

Keep up the good work!

doomedramen commented 10 years ago

based on the source it looks like it is coming soon (https://github.com/dasmoth/dalliance/blob/master/js/cbrowser.js#L1324)

andreasprlic commented 8 years ago

It is actually easy to do this yourself:

just add the following code to your page:

<a class="btn" href="#" role="button" onclick="requestFullscreen('svgHolder'); return false;"><i class="fa fa-arrows-alt"></i> Fullscreen</a>
<script>
function requestFullscreen(ele) {

        $('#' +ele).css({"padding":"5%","background":"white"});

        var elem = document.getElementById(ele);
        if (elem.requestFullscreen) {
            elem.requestFullscreen();
        } else if (elem.msRequestFullscreen) {
            elem.msRequestFullscreen();
        } else if (elem.mozRequestFullScreen) {
            elem.mozRequestFullScreen();
        } else if (elem.webkitRequestFullscreen) {
            elem.webkitRequestFullscreen();
        }
    }
</script>

e.g.: http://www.rcsb.org/pdb/gene/HBA1