Skip to content

Commit

Permalink
Fix in tab (jupyter-widgets#1099)
Browse files Browse the repository at this point in the history
* fix: do not give an error in an ipywidgets Tab

* docs: remove non-existing --overwrite flag

* chore: make this installable without needing rust
  • Loading branch information
maartenbreddels authored Feb 10, 2023
1 parent 3b3636f commit e5f22d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ If you are using the classic Jupyter Notebook you need to install the nbextensio

```
jupyter nbextension install --py --symlink --sys-prefix --overwrite ipyleaflet
jupyter nbextension enable --py --sys-prefix --overwrite ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet
```

Note for developers:
Expand Down
3 changes: 3 additions & 0 deletions js/src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ export class LeafletMapView extends utils.LeafletDOMWidgetView {
break;
case 'after-show':
this.dirty = true;
// If we are in a jupyter-widget tab, we get an after-show before
// this.displayed is resolved. In this case, obj is not created yet.
if(!this.obj) return;
this.obj.invalidateSize({
animate: false,
pan: true,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[build-system]
requires = ["jupyter_packaging~=0.12", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]
# avoid 3.6 so we don't need the rust buildchain
requires = ["jupyter_packaging~=0.12", "jupyterlab>=3.0.0,<3.6", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

0 comments on commit e5f22d1

Please sign in to comment.