Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapPlugin.hide() mapPlugin.show() small issue #851

Closed
haldo98 opened this issue Feb 5, 2023 · 2 comments
Closed

mapPlugin.hide() mapPlugin.show() small issue #851

haldo98 opened this issue Feb 5, 2023 · 2 comments
Labels
Milestone

Comments

@haldo98
Copy link

haldo98 commented Feb 5, 2023

Describe the bug

Just a minuscule thing...

I use a custom key to toogle some immersive mode

  'm': (viewer) => { 
      if (viewer.isFullscreenEnabled()) { 
         viewer.navbar.show();
         compassPlugin.show();
         mapPlugin.show(); 
         mapPlugin.open();
         viewer.toggleFullscreen();
         } else { 
         viewer.navbar.hide(); 
         compassPlugin.hide();
         viewer.panel.hide();
         mapPlugin.minimize();
         mapPlugin.close();
         mapPlugin.hide();
         viewer.toggleFullscreen();
         } 
   },

When the map is maximized and I hit the "m" key... map closes, navbar, compass and map hides and the viewer goes fullscreen as expected.

When I hit again the "m" key the viewer exits fullscreen, compass and bar appears but the map does not have the overlayImage

This happens only if the map is maximized and only with mapPlugin.hide() and mapPlugin.show() if I remove those two lines the overlayImage is shown correctly.

Online demo URL

https://www.tadini.it/temp/panorama_colombe.htm

Photo Sphere Viewer version

5.1.1

Plugins loaded

map

OS & browser

win 11 - chrome 109

Additional context

No response

@haldo98 haldo98 added the bug label Feb 5, 2023
@mistic100 mistic100 added this to the 5.1.2 milestone Feb 5, 2023
@mistic100
Copy link
Owner

Fixed.

By the way you don't need to call "close" and "open", it is enough to call "minimize"+"hide" and "show"

@github-actions
Copy link

github-actions bot commented Mar 2, 2023

This feature/bug fix has been released in version 5.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants