EditorOptions: {
    componentDrawnHandler: ((c, id) => void);
    height: number;
    selectModeHandler: (() => void);
    viewClickHandler: ((e, id) => void);
    width: number;
}

Type declaration

  • componentDrawnHandler: ((c, id) => void)

    function being called when finished drawing a valid component (eg. rectangle with width and height greater than 0 or polygon width at least three points), does not apply to importing

      • (c, id): void
      • Parameters

        Returns void

  • height: number

    if you let imagemapper create the SVGElement for you, you could specify height for it here

  • selectModeHandler: (() => void)

    function being called when editor switches to select mode when eg. Esc keydown event or mousedown event on handle is causing it to leave draw mode

      • (): void
      • Returns void

  • viewClickHandler: ((e, id) => void)

    when using view this function will be called on click events from the shapes

      • (e, id): void
      • Parameters

        • e: Event
        • id: string

        Returns void

  • width: number

    if you let imagemapper create the SVGElement for you, you could specify width for it here

Generated using TypeDoc