Skip to content

Commit

Permalink
Added Jupyter Lab 4 support (#1146)
Browse files Browse the repository at this point in the history
* Added @Lumino dependencies.

* Removed unused @Lumino dependencies.

* Updated webpack-cli version.

* Changed @Lumino dependencies to v2.

* Removed @Lumino dependencies.

* Fixed resize bug.

Added if(!this.obj) return; for all branches.

* Updated @jupyterlab/builder version.

* Updated @jupyterlab/builder dependency.

* Updated jupyterlab python version.
  • Loading branch information
cdanielw authored Nov 23, 2023
1 parent 1e48a1f commit e4f3f63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"stream-browserify": "^3.0.0"
},
"devDependencies": {
"@jupyterlab/builder": "^3.6.0",
"@jupyterlab/builder": "^4.0.8",
"css-loader": "^3.4.2",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -65,7 +65,7 @@
"rimraf": "^2.6.1",
"style-loader": "^1.1.2",
"webpack": "^5",
"webpack-cli": "^3.3.10"
"webpack-cli": "^5.1.4"
},
"jupyterlab": {
"extension": "src/jupyterlab-plugin",
Expand Down
2 changes: 1 addition & 1 deletion js/src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ export class LeafletMapView extends utils.LeafletDOMWidgetView {

_processLuminoMessage(msg, _super) {
_super.call(this, msg);
if(!this.obj) return;
switch (msg.type) {
case 'resize':
// We set the dirty flag to true to prevent the sub-pixel error
Expand All @@ -468,7 +469,6 @@ export class LeafletMapView extends utils.LeafletDOMWidgetView {
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build-system]
# avoid 3.6 so we don't need the rust buildchain
requires = ["jupyter_packaging~=0.12", "jupyterlab~=3.6.0", "setuptools>=40.8.0", "wheel"]
requires = ["jupyter_packaging~=0.12", "jupyterlab~=4.0.8", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

0 comments on commit e4f3f63

Please sign in to comment.