Skip to content

0.2.2: rectangle widget, text labels, and the readout for the host - #5

Merged
CSSFrancis merged 7 commits into
directelectron:mainfrom
TheDrOnos:dev/figure-rect-readout
Sep 23, 2026
Merged

CSSFrancis merged 7 commits into
directelectron:mainfrom
TheDrOnos:dev/figure-rect-readout

Conversation

@TheDrOnos

Copy link
Copy Markdown
Contributor

Three additions Ground Crew's DQE mode consumes, each a thin wrapper in the shape of the existing circle/line ones:

  • FigureView.add_rectangle_widget: a draggable rectangle with an optional max_extent size cap; on_change(x, y, w, h) fires when a drag settles. Replaces a stopgap in Ground Crew that reached FigureView._plot2d.
  • FigureView.add_texts: text labels at image-pixel positions, one colour or one per text, with an optional halo; the same name replaces the group in place.
  • FigureView.set_readout_visible and FigureFrame's onReadout: every figure frame relays anyplotlib's hover readout (apl:readout) to the host page, so an app can hide the on-image pill and print the position and value in its own units. The listener keeps only messages from its own iframe, so a figure mounted twice serves each mount.

anyplotlib floor raised to 0.10.0 (the readout event and text halos).

Confirmed end to end in Ground Crew against this branch: its DQE e2e drives the real hover relay and the rectangle widget.

@CSSFrancis
CSSFrancis merged commit acb8ee8 into directelectron:main Sep 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants