Commit a002ffb
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
0 commit comments