Interface IStaticProps

Static properties for a component. These properties remain constant throughout the lifecycle of the component. This interface extends IStaticProps, inheriting the static properties defined for modules.

Hierarchy

Properties

__fixHelperStaticProps?: any
container?: false | Element

The parent element of the canvas, used to calculate the canvas size. If set to false, the canvas size will be based on the Window object.

Default

false
hasInitialResize?: boolean

Resizes the canvas during initialization.

Default

true
hasResize?: boolean

Enables updating the canvas size when the window is resized.

Default

false
media: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | Ctx2D<NCtx2D.IStaticProps, NCtx2D.IChangeableProps, NCtx2D.ICallbacksTypes> | SVGImageElement

The media element to be rendered. It can be an instance of Ctx2D or a source object like an HTMLImageElement or HTMLVideoElement.

resizeDebounce?: number

The debounce time (in milliseconds) for the resize event.

Default

0
shouldAppend?: boolean

Determines whether the canvas element should be appended to the parent element.

Default

true
viewportTarget?: keyof IViewportCallbackTypes

The target for the viewport resize event.

Default

'any'