Repository navigation
v0.3.2 — JSON region bounds rehydrated in the store
Released 2026-08-13.
Fixed
-
Regions handed to the store as JSON now render on every backend (jit-ui#124). A
boundsthat came throughJSON.parse— a host's server response, astructuredClone— has the right fields but not the right prototype, and the renderers disagreed about whether that is acceptable:Region.getShape()(Plotly) and the napari overlay duck-type the bounds, while the OpenSeadragon overlay discriminates withbounds instanceof Rectangle. So a JSON region drew in Heatmap mode and silently vanished in Image mode.instanceofalso gates the store's geometry de-duplication,moveRegion, and the GeoJSON export, so the same regions were undraggable, re-appended on every repeat, and missing from a save — in every mode, unreported because they were at least visible.RegionStorenow normalizes on the way in (setRegions,addRegion,enterStackMode) via the exportedhydrateBounds, so the ~20instanceofcall sites downstream stay valid rather than each having to duck-type. Instances are passed through by reference — overlays and tools mutate the bounds they created during a drag.hydrateBoundsalso fills in what a lean serializer omits (JIT's JavaPolygonSerializerwrites onlynpoints/xpoints/ypoints, while the GeoJSON export readscoordinatesand the overlays readclosed).
npm: @jax-data-science/sci-image-visualizer@0.3.2
Full diff: v0.3.1...v0.3.2