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

Tab does not interact well with ipyleaflet Map object #3384

Closed
PROgram52bc opened this issue Feb 15, 2022 · 3 comments
Closed

Tab does not interact well with ipyleaflet Map object #3384

PROgram52bc opened this issue Feb 15, 2022 · 3 comments
Milestone

Comments

@PROgram52bc
Copy link

Description

When an ipyleaflet Map object is placed inside a tab other than the first one, it doesn't get fully rendered, where there are gray areas as illustrated in the screenshot.

Screenshot from 2022-02-14 19-15-06

I am suspecting this is an issue more related to the Tab widget rather than the Map class, because when I place the map on the first tab, it renders correctly. But it might be a bug with ipyleaflet as well. Let me know what you think!

Reproduce

  1. Create a fresh environment, with ipyleaflet and ipywidgets installed.
  2. Create a new notebook with the following content
from ipyleaflet import Map
from ipywidgets import Tab, Text
m = Map(center=(0,0), zoom=2)
display(Tab([Text("blah"), m]))
  1. Click on the second tab
  2. The behavior should be reproduced

Expected behavior

Map should be rendered without gray areas.

Context

  • ipywidgets version
  • Operating System and version: Ubuntu 18.04
  • Browser and version: Chrome Version 96.0.4664.110 (Official Build) (64-bit)
@afonit
Copy link

afonit commented Feb 16, 2022

That is a known current issue, as I recall it gets fixed in ipywidgets 8. If I can find the issue/comment I will post a link to it here. I did not find it with a quick search.

As a workaround - if you resize your browser window, make it full screen, then not full screen, the map will display correctly.

Edit:
Here is the comment mentioning ipywidgets 8:
jupyter-widgets/ipyleaflet#904 (comment)

@jasongrout
Copy link
Member

Yes, this should be fixed in 8.0. This is a relevant issue: #2762

@jasongrout jasongrout added this to the 8.0 milestone Feb 17, 2022
@PROgram52bc
Copy link
Author

As a workaround - if you resize your browser window, make it full screen, then not full screen, the map will display correctly.

Thanks! I am wondering if there is a "programmatic workaround" that doesn't require user interaction?

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

No branches or pull requests

3 participants