v9.0.0
Full Changelog: v8.0.0...v9.0.0
@h5web/app
- ✨
[H5GroveProvider, MockProvider]
Support exporting< Raw >
visualizations to JSON #1485 - ✨ Allow zooming on very thin selection boxes #1482
- 🐛 Fix heatmap snapshot feature and, more generally, fix saving WebGL canvas as image via "save image as" #1453 #1460
⚠️ A number of CSS custom properties related to the domain widget (previously called "domain slider") have been renamed — cf. #1456. If you customise these properties in your app, please rename them.
@h5web/lib
Canvas
- 🐛
[VisCanvas]
Fix saving WebGL canvas as image via "save image as" #1453 #1460 ⚠️ The DOM structure created byVisCanvas
has changed significantly, which may impact advanced use cases — see also #1471
Interactions
- ✨
[SelectToZoom, SelectionTool]
Allow cancelling selection-based interactions with right click #1370 #1463 - ✨
[SelectToZoom]
Allow zooming on very thin selection boxes #1482 - ✨
⚠️ Allow interacting with canvas through other interactive elements, like SVG elements. Interactive elements on top of the canvas must now take care of stopping the propagation of events that might lead to conflicting interactions before they bubble up the DOM (typicallypointerdown
to prevent panning/selecting). #1388 #1473
HTML/SVG overlays
- ✨
⚠️ [Overlay]
Overflow canvas bounds by default — to hide the overflow, simply pass the appropriate inline style #1470 - 🐛
[Annotation]
Fix position of overflowing annotations #1467 - 🐛
[SvgRect]
Fix rectangle with inset stroke disappearing when width or height is close to zero (internally,SvgRect
now renders apath
element instead of arect
) #1482 ⚠️ [Html]
Remove propcontainer
and stop wrapping children with an extradiv
element #1465- If you were using prop
container
, we now recommend rendering the children through a React Portal instead. The three DOM containers rendered byVisCanvas
are now available in the context, so you can use them as portal targets (cf. #1467 and #1479). However, remember that this is for advanced use cases only; the followingHtml
-based components should be used in priority:Annotation
,Overlay
,SvgElement
, andFloatingControl
.
- If you were using prop
Toolbar
- 🐛
[DomainWidget]
(previouslyDomainSlider
): Moving one histogram marker now toggles off autoscale only for the corresponding bound (i.e. min or max, not both) #1422 #1439⚠️ [Histogram]
Replace proponChange
with two props:onChangeMin
andonChangeMax
#1439
⚠️ RenameDomainSlider
toDomainWidget
and export internal components #1382 #1377 #1445- ✨ Export component
DomainSlider
, which now corresponds to the slider part of theDomainWidget
#1448 - ✨ Export component
DomainControls
, which corresponds to the content of theDomainWidget
's popup (with the bound inputs, autoscale buttons, histogram, etc.) #1455 ⚠️ As a result of these changes, a number of CSS custom properties have been renamed — cf. #1456
- ✨ Export component
- Export component
ColorMapOption
#1461 [ExportMenu]
Add propalign
to change the alignment of the Export menu popup (defaults to"center"
) #1485
Utilities & hooks
⚠️ Rename hookuseCanvasEvents
touseCanvasEvent
— the hook must now be called once per event to listen for, similarly to react-hookz'useEventListener
, and the given listener function no longer needs to be wrapped withuseCallback
. Note that, in relation to #1388,useCanvasEvent
no longer registers events on thecanvas
element but on a parent container. #1481- ✨ Add hook
useInteraction
— use it to register and control your own canvas interactions #1475 #1477 - ✨ Add hook
useModifierKeyPressed
— use it to keep track of the pressed state of one or more modifier keys #1475 #1477 - ✨ Add experimental hook
useDrag
— use it to make SVG and other elements on top of the canvas draggable (e.g. moveable/resizeable ROIs) #1478
@h5web/h5wasm
- ✨
[H5WasmProvider]
Support exporting< Raw >
visualizations to JSON #1485 [H5WasmProvider]
Parse nested array types returned by h5wasm #1486
Screenshots
Experimental useDrag
hook
This recording also demonstrates interacting with the canvas through other interactive elements.