Interface Element

Hierarchy

Index

Properties

Methods

Properties

public clipper: Element

public content: string

public masker: Element

public node: LinkedHTMLElement

public track: Element

Methods

public add(element: Element, i?: number): Element

Parameters

  • element: Element
  • i?: number optional

Returns

Element

public after(element: Element): Element

Parameters

Returns

Element

public animate(duration?: number, ease?: string, delay?: number): Animation

Parameters

  • duration?: number optional
  • ease?: string optional
  • delay?: number optional

Returns

Animation

public animate(info: { ease?: string; duration?: number; delay?: number; }): Animation

Parameters

  • info: { ease?: string; duration?: number; delay?: number; }

Returns

Animation

public attr(name: string): any

Parameters

  • name: string

Returns

any

public attr(obj: Object): Element

Parameters

  • obj: Object

Returns

Element

public attr(name: string, value: any, namespace?: string): Element

Parameters

  • name: string
  • value: any
  • namespace?: string optional

Returns

Element

public back(): Element

Returns

Element

public backward(): Element

Returns

Element

public bbox(): BBox

Returns

BBox

public before(element: Element): Element

Parameters

Returns

Element

public center(x: number, y: number, anchor?: boolean): Element

Parameters

  • x: number
  • y: number
  • anchor?: boolean optional

Returns

Element

public children(): Element[]

Returns

Element[]

public circle(diameter: number): Element

Parameters

  • diameter: number

Returns

Element

public click(cb: Function)

Parameters

  • cb: Function

public clipWith(element: Element): Element

Parameters

Returns

Element

public cx(x: number, anchor?: boolean): Element

Parameters

  • x: number
  • anchor?: boolean optional

Returns

Element

public cy(y: number, anchor?: boolean): Element

Parameters

  • y: number
  • anchor?: boolean optional

Returns

Element

public data(name: string): any

Parameters

  • name: string

Returns

any

public data(name: string, value: any): Element

Parameters

  • name: string
  • value: any

Returns

Element

public doc(): Doc

Returns

Doc

public each(iterator: (i?: number, children?: svgjs.Element[]) => void, deep?: boolean)

Parameters

  • iterator: (i?: number, children?: svgjs.Element[]) => void
  • deep?: boolean optional

public ellipse(w: number, h: number): Element

Parameters

  • w: number
  • h: number

Returns

Element

public fill(fill: { color?: string; opacity?: number; }): Element

Parameters

  • fill: { color?: string; opacity?: number; }

Returns

Element

public fill(color: string): Element

Parameters

  • color: string

Returns

Element

public fill(pattern: Element): Element

Parameters

Returns

Element

public filter(adder: (filter: svgjs.Filter) => void): Element

Parameters

  • adder: (filter: svgjs.Filter) => void

Returns

Element

public font(font: { family?: string; size?: number; anchor?: string; leading?: string; }): Element

Parameters

  • font: { family?: string; size?: number; anchor?: string; leading?: string; }

Returns

Element

public forget(keys?: Array<string>): Element

Parameters

  • keys?: Array<string> optional

Returns

Element

public forward(): Element

Returns

Element

public front(): Element

Returns

Element

public group(): Element

Returns

Element

public hide(): Element

Returns

Element

public image(url: string, w?: number, h?: number): Element

Parameters

  • url: string
  • w?: number optional
  • h?: number optional

Returns

Element

public line(x1: number, y1: number, x2: number, y2: number): Element

Parameters

  • x1: number
  • y1: number
  • x2: number
  • y2: number

Returns

Element

public maskWith(element: Element): Element

Parameters

Returns

Element

public move(x: number, y: number, anchor?: boolean): Element

Parameters

  • x: number
  • y: number
  • anchor?: boolean optional

Returns

Element

public nested(): Doc

Returns

Doc

public next(): Element

Returns

Element

public off(event: string, cb: Function)

Parameters

  • event: string
  • cb: Function

public on(event: string, cb: Function)

Parameters

  • event: string
  • cb: Function

public opacity(o: number): Element

Parameters

  • o: number

Returns

Element

public path(data: string): Element

Parameters

  • data: string

Returns

Element

public plot(data: string): Element

Parameters

  • data: string

Returns

Element

public polygon(data: string): Element

Parameters

  • data: string

Returns

Element

public polygon(points: Array<number[]>): Element

Parameters

  • points: Array<number[]>

Returns

Element

public polyline(data: string): Element

Parameters

  • data: string

Returns

Element

public polyline(points: Array<number[]>): Element

Parameters

  • points: Array<number[]>

Returns

Element

public position(): number

Returns

number

public previous(): Element

Returns

Element

public put(element: Element, i?: number): Element

Parameters

  • element: Element
  • i?: number optional

Returns

Element

public rbox(): RBox

Returns

RBox

public rect(w: number, h: number): Element

Parameters

  • w: number
  • h: number

Returns

Element

public remember(name: string, value: any): Element

Parameters

  • name: string
  • value: any

Returns

Element

public remember(obj: Object): Element

Parameters

  • obj: Object

Returns

Element

public remember(name: string): any

Parameters

  • name: string

Returns

any

public remove()

public rotate(d: number, cx?: number, cy?: number): Element

Parameters

  • d: number
  • cx?: number optional
  • cy?: number optional

Returns

Element

public scale(x: number, y: number): Element

Parameters

  • x: number
  • y: number

Returns

Element

public show(): Element

Returns

Element

public siblings(): Element[]

Returns

Element[]

public size(w: number, h: number, anchor?: boolean): Element

Parameters

  • w: number
  • h: number
  • anchor?: boolean optional

Returns

Element

public skew(x: number, y: number): Element

Parameters

  • x: number
  • y: number

Returns

Element

public stroke(data: { color?: string; opacity?: number; width?: number; }): Element

Parameters

  • data: { color?: string; opacity?: number; width?: number; }

Returns

Element

public stroke(color: string): Element

Parameters

  • color: string

Returns

Element

public style(name: string, value: string): Element

Parameters

  • name: string
  • value: string

Returns

Element

public style(obj: Object): Element

Parameters

  • obj: Object

Returns

Element

public style(name: string): string

Parameters

  • name: string

Returns

string

public style(): string

Returns

string

public text(text: string): Element

Parameters

  • text: string

Returns

Element

public text(adder: (element: svgjs.Element) => void): Element

Parameters

  • adder: (element: svgjs.Element) => void

Returns

Element

public transform(t: Transform): Element

Parameters

Returns

Element

public transform(): Transform

Returns

Transform

public translate(x: number, y: number): Element

Parameters

  • x: number
  • y: number

Returns

Element

public tspan(text: string): Element

Parameters

  • text: string

Returns

Element

public unclip(): Element

Returns

Element

public unmask(): Element

Returns

Element

public use(element: Element): Element

Parameters

Returns

Element

public viewbox(): Viewbox

Returns

Viewbox

public viewbox(x: number, y: number, w: number, h: number): Element

Parameters

  • x: number
  • y: number
  • w: number
  • h: number

Returns

Element

public viewbox(obj: Viewbox): Element

Parameters

Returns

Element

public visible(): boolean

Returns

boolean

public x(x: number, anchor?: boolean): Element

Parameters

  • x: number
  • anchor?: boolean optional

Returns

Element

public x(): number

Returns

number

public y(y: number, anchor?: boolean): Element

Parameters

  • y: number
  • anchor?: boolean optional

Returns

Element

public y(): number

Returns

number