Skip to main content

ExportControlsComponent

const ExportControlsComponent: object

Provides a component that offers buttons for export to SVG, PNG and/or JPG.

Type Declaration

methods

methods: object

methods.exportJPG()

exportJPG: () => void

Returns

void

methods.exportPNG()

exportPNG: () => void

Returns

void

methods.exportSVG()

exportSVG: () => void

Returns

void

methods.loadSurface()

loadSurface: (cb) => void

Parameters
cb

(s) => any

Returns

void

name

name: string = COMPONENT_EXPORT_CONTROLS

props

props: object

props.allowJpgExport

allowJpgExport: object

Defaults to true.

props.allowJpgExport.default

default: boolean = true

props.allowJpgExport.type

type: BooleanConstructor = Boolean

props.allowPngExport

allowPngExport: object

Defaults to true.

props.allowPngExport.default

default: boolean = true

props.allowPngExport.type

type: BooleanConstructor = Boolean

props.allowSvgExport

allowSvgExport: object

Defaults to true.

props.allowSvgExport.default

default: boolean = true

props.allowSvgExport.type

type: BooleanConstructor = Boolean

props.imageOptions

imageOptions: object

Options for image exports.

props.imageOptions.type

type: PropType<ImageExportUIOptions>

props.label

label: object

props.label.default

default: string = "Export :"

props.label.type

type: StringConstructor = String

props.margins

margins: object

props.margins.type

type: PropType<PointXY>

props.showLabel

showLabel: object

props.showLabel.default

default: boolean = true

props.showLabel.type

type: BooleanConstructor = Boolean

props.surfaceId

surfaceId: object

props.surfaceId.type

type: StringConstructor = String

props.svgOptions

svgOptions: object

Options for SVG exports.

props.svgOptions.type

type: PropType<SvgExportUIOptions>

render()

render(): VNode<RendererNode, RendererElement, {[key: string]: any; }>

Returns

VNode<RendererNode, RendererElement, {[key: string]: any; }>

setup()

setup(props): object

Parameters

props

ExportControlsComponentProps

Returns

object

service

service: unknown