These are chat archives for openseadragon/openseadragon

13th
Aug 2018
Benjamin Pirih
@bpirih_gitlab
Aug 13 2018 19:40
How can I catch the exit full screen event. We have a google maps embed on a page and for some reason going full screen / then closing is causing the map to display wonky..
i see the pre-full-page event but I don't see post-full-page??
oh found it.. full-screen event.. with fullscreen=false
Ian Gilman
@iangilman
Aug 13 2018 20:10
:thumbsup:
Benjamin Pirih
@bpirih_gitlab
Aug 13 2018 20:40
@iangilman can you think of any reason why going full screen / reverting to normal view would cause a google map on the same page to get sized wonky..
Benjamin Pirih
@bpirih_gitlab
Aug 13 2018 21:12
here is the page before the full-screen .. note google maps in top right hand..
image.png
then after a full screen view and revert .. the google map is now wrong.. :(
image.png
Ian Gilman
@iangilman
Aug 13 2018 21:20
@bpirih_gitlab When we go full screen we actually remove the other objects from the screen. When we come back we put them back on the page. It's possible the Google Map gets a little confused by this. Perhaps there's some way to have it reset itself after you get the full-screen event?
Basically it needs to have its resize method triggered or something.
Benjamin Pirih
@bpirih_gitlab
Aug 13 2018 21:27
yes I am trying just that.. but doesn't seem to do what I want..
viewer.addHandler('full-screen', function (a) {
    debugger;
    if (!a.fullScreen) {
        if( !{!c_RefreshTenant} ) 
        {
            setTimeout(function(){ 
                //var map = new google.maps.Map(document.querySelector('.js-map') );
                //alert('here');
                //google.maps.event.trigger(map, 'resize');
                 }, 100);
        }
    } else {

    }
});
Figured I needed the timeout to let the re-draw finish before I called the 'resize' event.. will continue to pound on it.. thanks @iangilman !!
Ian Gilman
@iangilman
Aug 13 2018 21:42
Yeah, that seems like the right direction...