Skip to content

Commit daa8caf

Browse files
committed
Do not prevent scrolling in pageMode
1 parent 7fd3324 commit daa8caf

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

docs/notebooks/page_mode_example.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,18 @@
147147
},
148148
{
149149
"cell_type": "code",
150-
"execution_count": 1,
150+
"execution_count": 12,
151151
"metadata": {},
152152
"outputs": [],
153153
"source": [
154-
"from esbuild_py import transform\n",
155154
"from vitessce import (\n",
156155
" VitessceConfig,\n",
157156
" Component as cm,\n",
158157
" CoordinationType as ct,\n",
159158
" AnnDataWrapper,\n",
160159
" CsvWrapper,\n",
161160
")\n",
162-
"from os.path import join"
161+
"from esbuild_py import transform"
163162
]
164163
},
165164
{
@@ -171,16 +170,16 @@
171170
},
172171
{
173172
"cell_type": "code",
174-
"execution_count": 15,
173+
"execution_count": 13,
175174
"metadata": {},
176175
"outputs": [
177176
{
178177
"data": {
179178
"text/plain": [
180-
"<vitessce.config.VitessceConfig at 0x2d3892c50>"
179+
"<vitessce.config.VitessceConfig at 0x177917d30>"
181180
]
182181
},
183-
"execution_count": 15,
182+
"execution_count": 13,
184183
"metadata": {},
185184
"output_type": "execute_result"
186185
}
@@ -322,7 +321,7 @@
322321
},
323322
{
324323
"cell_type": "code",
325-
"execution_count": 16,
324+
"execution_count": 15,
326325
"metadata": {},
327326
"outputs": [],
328327
"source": [
@@ -409,21 +408,21 @@
409408
},
410409
{
411410
"cell_type": "code",
412-
"execution_count": 18,
411+
"execution_count": 16,
413412
"metadata": {},
414413
"outputs": [
415414
{
416415
"data": {
417416
"application/vnd.jupyter.widget-view+json": {
418-
"model_id": "f24cc9d59e9a4d458c4be1a66d481bc6",
417+
"model_id": "4a2ef58904b34cb38cc97eb7330364a5",
419418
"version_major": 2,
420419
"version_minor": 1
421420
},
422421
"text/plain": [
423422
"VitessceWidget(config={'version': '1.0.17', 'name': 'ComparativeData example', 'description': '', 'datasets': …"
424423
]
425424
},
426-
"execution_count": 18,
425+
"execution_count": 16,
427426
"metadata": {},
428427
"output_type": "execute_result"
429428
}

src/vitessce/widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def get_uid_str(uid):
338338
const divRef = React.useRef();
339339
340340
React.useEffect(() => {
341-
if(!divRef.current) {
341+
if(!divRef.current || pageMode) {
342342
return () => {};
343343
}
344344
@@ -364,7 +364,7 @@ def get_uid_str(uid):
364364
divRef.current.removeEventListener("mouseleave", handleMouseLeave);
365365
}
366366
};
367-
}, [divRef]);
367+
}, [divRef, pageMode]);
368368
369369
// Config changed on JS side (from within <Vitessce/>),
370370
// send updated config to Python side.

0 commit comments

Comments
 (0)