SVGHelper: { circle: ((cx: number, cy: number, r: number) => SVGCircleElement); group: ((...others: SVGElement[]) => SVGGElement); image: ((src: string, x: number, y: number, w: number, h: number) => SVGImageElement); path: ((d?: string) => SVGPathElement); rect: ((x: number, y: number, w: number, h: number, rx?: number, ry?: number) => SVGRectElement); text: ((x: number, y: number, text?: string) => SVGTextElement); animate: any; createSVGElement: any; drag: any; getAngle: any; getDOMRect: any; getEase: any; setAttrs: any; setTransform: any; svgWrapper: any } = ...

Type declaration

  • circle: ((cx: number, cy: number, r: number) => SVGCircleElement)
      • (cx: number, cy: number, r: number): SVGCircleElement
      • Parameters

        • cx: number
        • cy: number
        • r: number

        Returns SVGCircleElement

  • group: ((...others: SVGElement[]) => SVGGElement)
      • (...others: SVGElement[]): SVGGElement
      • Parameters

        • Rest ...others: SVGElement[]

        Returns SVGGElement

  • image: ((src: string, x: number, y: number, w: number, h: number) => SVGImageElement)
      • (src: string, x: number, y: number, w: number, h: number): SVGImageElement
      • Parameters

        • src: string
        • x: number
        • y: number
        • w: number
        • h: number

        Returns SVGImageElement

  • path: ((d?: string) => SVGPathElement)
      • (d?: string): SVGPathElement
      • Parameters

        • d: string = ""

        Returns SVGPathElement

  • rect: ((x: number, y: number, w: number, h: number, rx?: number, ry?: number) => SVGRectElement)
      • (x: number, y: number, w: number, h: number, rx?: number, ry?: number): SVGRectElement
      • Parameters

        • x: number
        • y: number
        • w: number
        • h: number
        • rx: number = 0
        • ry: number = 0

        Returns SVGRectElement

  • text: ((x: number, y: number, text?: string) => SVGTextElement)
      • (x: number, y: number, text?: string): SVGTextElement
      • Parameters

        • x: number
        • y: number
        • text: string = ''

        Returns SVGTextElement

  • animate:function
    • Parameters

      • start: number
      • end: number
      • callback: ((val: number) => void)
          • (val: number): void
          • Parameters

            • val: number

            Returns void

      • duration: number
      • Optional endCallback: Function
      • easeType: string = "ease-in"

      Returns number

  • createSVGElement:function
    • Parameters

      • name: string
      • Optional parent: SVGElement

      Returns SVGElement

  • drag:function
    • Parameters

      • node: Element
      • dragMove: ((e: MouseEvent) => void)
          • (e: MouseEvent): void
          • Parameters

            • e: MouseEvent

            Returns void

      • dragStart: ((e: MouseEvent) => void)
          • (e: MouseEvent): void
          • Parameters

            • e: MouseEvent

            Returns void

      • dragEnd: ((e: MouseEvent) => void)
          • (e: MouseEvent): void
          • Parameters

            • e: MouseEvent

            Returns void

      Returns (() => void)

        • (): void
        • Returns void

  • getAngle:function
  • getDOMRect:function
    • Parameters

      • str: any

      Returns DOMRect

  • getEase:function
  • setAttrs:function
    • Parameters

      • dom: Element
      • attrs: Record<string, any>

      Returns void

  • setTransform:function
    • Parameters

      • scale: any
      • translateX: any
      • translateY: any

      Returns string

  • svgWrapper:function
    • Parameters

      • svgString: string
      • Optional parent: SVGElement

      Returns SVGElement

Generated using TypeDoc