Skip to content

Commit a002ffb

Browse files
timtreisclaude
andcommitted
Add anywidget + plotly to interactive feature for client-side drawing
Add anywidget and plotly>=5.20,<6 to the pixi interactive dep-group so the prototype notebook can render a custom HTML5/SVG drawing widget. anywidget is the canonical path for traitlet-based widget sync in VSCode-Remote; plotly is pinned to 5.x because its 6.0 anywidget-backed FigureWidget does not relay client-side relayout events back to Python (so layout.shapes never syncs there). The Sandbox.ipynb prototype itself lives outside this repo (/home/.../lustre/projects/spatialdata-plot/), but its current state implements a working anywidget-based draw canvas: pure client-side SVG drawing (rectangle drag, polygon click-then-Close-polygon, lasso freehand drag), shapes pushed back via the `shapes` traitlet, pixel→CS coordinate mapping that respects matplotlib's origin='upper' image axis, multi-shape commit per Save, and an explicit "Write last to disk" button for persistence. Sandbox.anywidget-v0.ipynb is preserved alongside as a reference snapshot before optimization. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6ad2aca commit a002ffb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ doc = [
6262
"sphinxext-opengraph",
6363
]
6464
interactive = [
65+
"anywidget",
6566
"ipykernel",
6667
"ipympl",
6768
"ipywidgets",
69+
# pinned to 5.x: plotly 6's anywidget-backed FigureWidget doesn't relay
70+
# client-side draw events back to Python, so layout.shapes never syncs.
71+
"plotly>=5.20,<6",
6872
"squidpy",
6973
]
7074

0 commit comments

Comments
 (0)