Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SVGComponent

Index

Constructors

constructor

  • new SVGComponent(svgContainer: HTMLElement, viewer: any): SVGComponent
  • Parameters

    • svgContainer: HTMLElement
    • viewer: any

    Returns SVGComponent

Properties

draw

draw: Svg

itemAry

itemAry: ItemDataSchema[]

svgContainer

svgContainer: HTMLElement

Methods

addItem

  • addItem(item: ItemDataSchema): void
  • Parameters

    • item: ItemDataSchema

    Returns void

deleteItem

destroy

  • destroy(): void
  • Returns void

destroyAll

  • destroyAll(): void
  • Returns void

drawDiv

  • drawDiv(worldPosition: any, divDom: HTMLElement): HTMLElement
  • Parameters

    • worldPosition: any
    • divDom: HTMLElement

    Returns HTMLElement

drawLine

  • drawLine(worldPositionAry: [any, any], width?: number, color?: string, dasharray?: string): Line
  • Parameters

    • worldPositionAry: [any, any]
    • Optional width: number
    • Optional color: string
    • Optional dasharray: string

    Returns Line

drawPath

  • drawPath(worldPositionAry: any[], pathStr?: string, width?: number, lineColor?: string, dasharray?: string, fillColor?: string): Path
  • Parameters

    • worldPositionAry: any[]
    • Optional pathStr: string
    • Optional width: number
    • Optional lineColor: string
    • Optional dasharray: string
    • Optional fillColor: string

    Returns Path

drawPoint

  • drawPoint(worldPosition: any, width?: number, color?: string): Circle
  • Parameters

    • worldPosition: any
    • Optional width: number
    • Optional color: string

    Returns Circle

drawPolygon

  • drawPolygon(worldPositionAry: any[], width?: number, color?: string, dasharray?: string): Polygon
  • Parameters

    • worldPositionAry: any[]
    • Optional width: number
    • Optional color: string
    • Optional dasharray: string

    Returns Polygon

drawPolyline

  • drawPolyline(worldPositionAry: any[], width?: number, color?: string, dasharray?: string): Polyline
  • Parameters

    • worldPositionAry: any[]
    • Optional width: number
    • Optional color: string
    • Optional dasharray: string

    Returns Polyline

drawRect

  • drawRect(opt: { bgColor?: string; borderColor?: string; height?: number; width?: number; worldPosition: any }): Rect
  • Parameters

    • opt: { bgColor?: string; borderColor?: string; height?: number; width?: number; worldPosition: any }
      • Optional bgColor?: string
      • Optional borderColor?: string
      • Optional height?: number
      • Optional width?: number
      • worldPosition: any

    Returns Rect

drawText

  • drawText(worldPosition: any, content: string, txtColor?: string): Text
  • Parameters

    • worldPosition: any
    • content: string
    • Optional txtColor: string

    Returns Text

init

  • init(): void
  • Returns void

lineUpdate

  • lineUpdate(worldPositionAry: [any, any], line: Line): void
  • Parameters

    • worldPositionAry: [any, any]
    • line: Line

    Returns void

updatePosition

  • updatePosition(): void
  • Returns void