ImFusion Web SDK

useFrameSelection

ts

Returns the reactive selection for a dataset.

Subscribes to SharedImageSet.onSelectionChanged.

Parameters

ParameterTypeDescription
sisSharedImageSetThe dataset to observe

Returns

ts

The current focus index, a setter, and the total frame count

NameType
focusnumber
setFocus()(index: number) => void
countnumber

Throws

If called outside of an ImFusionProvider

Throws

If called before the SDK has finished initializing

Example

tsx