Skip to content

Commit e5f22d1

Browse files
Fix in tab (#1099)
* fix: do not give an error in an ipywidgets Tab * docs: remove non-existing --overwrite flag * chore: make this installable without needing rust
1 parent 3b3636f commit e5f22d1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ If you are using the classic Jupyter Notebook you need to install the nbextensio
7777

7878
```
7979
jupyter nbextension install --py --symlink --sys-prefix --overwrite ipyleaflet
80-
jupyter nbextension enable --py --sys-prefix --overwrite ipyleaflet
80+
jupyter nbextension enable --py --sys-prefix ipyleaflet
8181
```
8282

8383
Note for developers:

js/src/Map.js

+3
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ export class LeafletMapView extends utils.LeafletDOMWidgetView {
466466
break;
467467
case 'after-show':
468468
this.dirty = true;
469+
// If we are in a jupyter-widget tab, we get an after-show before
470+
// this.displayed is resolved. In this case, obj is not created yet.
471+
if(!this.obj) return;
469472
this.obj.invalidateSize({
470473
animate: false,
471474
pan: true,

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.12", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]
2+
# avoid 3.6 so we don't need the rust buildchain
3+
requires = ["jupyter_packaging~=0.12", "jupyterlab>=3.0.0,<3.6", "setuptools>=40.8.0", "wheel"]
34
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)