Skip to content

Commit

Permalink
Do not prevent scrolling in pageMode
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Nov 27, 2024
1 parent 7fd3324 commit daa8caf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
19 changes: 9 additions & 10 deletions docs/notebooks/page_mode_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,18 @@
},
{
"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",
" CoordinationType as ct,\n",
" AnnDataWrapper,\n",
" CsvWrapper,\n",
")\n",
"from os.path import join"
"from esbuild_py import transform"
]
},
{
Expand All @@ -171,16 +170,16 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<vitessce.config.VitessceConfig at 0x2d3892c50>"
"<vitessce.config.VitessceConfig at 0x177917d30>"
]
},
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -322,7 +321,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -409,21 +408,21 @@
},
{
"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
},
"text/plain": [
"VitessceWidget(config={'version': '1.0.17', 'name': 'ComparativeData example', 'description': '', 'datasets': …"
]
},
"execution_count": 18,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
4 changes: 2 additions & 2 deletions src/vitessce/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def get_uid_str(uid):
const divRef = React.useRef();
React.useEffect(() => {
if(!divRef.current) {
if(!divRef.current || pageMode) {
return () => {};
}
Expand All @@ -364,7 +364,7 @@ def get_uid_str(uid):
divRef.current.removeEventListener("mouseleave", handleMouseLeave);
}
};
}, [divRef]);
}, [divRef, pageMode]);
// Config changed on JS side (from within <Vitessce/>),
// send updated config to Python side.
Expand Down

0 comments on commit daa8caf

Please sign in to comment.