diff --git a/docs/notebooks/page_mode_example.ipynb b/docs/notebooks/page_mode_example.ipynb index 994c895..1692771 100644 --- a/docs/notebooks/page_mode_example.ipynb +++ b/docs/notebooks/page_mode_example.ipynb @@ -147,11 +147,10 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ - "from esbuild_py import transform\n", "from vitessce import (\n", " VitessceConfig,\n", " Component as cm,\n", @@ -159,7 +158,7 @@ " AnnDataWrapper,\n", " CsvWrapper,\n", ")\n", - "from os.path import join" + "from esbuild_py import transform" ] }, { @@ -171,16 +170,16 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 15, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -322,7 +321,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -409,13 +408,13 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f24cc9d59e9a4d458c4be1a66d481bc6", + "model_id": "4a2ef58904b34cb38cc97eb7330364a5", "version_major": 2, "version_minor": 1 }, @@ -423,7 +422,7 @@ "VitessceWidget(config={'version': '1.0.17', 'name': 'ComparativeData example', 'description': '', 'datasets': …" ] }, - "execution_count": 18, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } diff --git a/src/vitessce/widget.py b/src/vitessce/widget.py index 2878acf..4900fe5 100644 --- a/src/vitessce/widget.py +++ b/src/vitessce/widget.py @@ -338,7 +338,7 @@ def get_uid_str(uid): const divRef = React.useRef(); React.useEffect(() => { - if(!divRef.current) { + if(!divRef.current || pageMode) { return () => {}; } @@ -364,7 +364,7 @@ def get_uid_str(uid): divRef.current.removeEventListener("mouseleave", handleMouseLeave); } }; - }, [divRef]); + }, [divRef, pageMode]); // Config changed on JS side (from within ), // send updated config to Python side.