Skip to main content

DiagramLink

A link in a diagram.

Accessors

color

Get Signature

get color(): string

Gets the link's stroke color.

Returns

string


dashArray

Get Signature

get dashArray(): string

Gets the link's dash array.

Returns

string


label

Get Signature

get label(): string

Gets the link's label.

Returns

string


labelLocation

Get Signature

get labelLocation(): number

Gets the link's label location.

Returns

number


lineWidth

Get Signature

get lineWidth(): number

Gets the link's stroke width.

Returns

number


outlineColor

Get Signature

get outlineColor(): string

Gets the link's outline color.

Returns

string


outlineWidth

Get Signature

get outlineWidth(): number

Gets the link's outline width.

Returns

number


source

Get Signature

get source(): any

Gets the link's source.

Returns

any


target

Get Signature

get target(): any

Gets the link's target.

Returns

any

Methods

remove()

remove(): void

Removes the link from the diagram.

Returns

void


setColor()

setColor(color): void

Sets the link's stroke color.

Parameters

color

string

Returns

void


setDashArray()

setDashArray(dashArray): void

Sets the link's dash array.

Parameters

dashArray

string

Returns

void


setLabel()

setLabel(label): void

Sets the link's label.

Parameters

label

string

Returns

void


setLabelLocation()

setLabelLocation(labelLocation): void

Sets the link's label location (0 to 1).

Parameters

labelLocation

number

Returns

void


setLineWidth()

setLineWidth(lineWidth): void

Sets the link's stroke width.

Parameters

lineWidth

number

Returns

void


setOutlineColor()

setOutlineColor(outlineColor): void

Sets the link's outline color.

Parameters

outlineColor

string

Returns

void


setOutlineWidth()

setOutlineWidth(outlineWidth): void

Sets the link's outline width.

Parameters

outlineWidth

number

Returns

void


setSource()

setSource(source): void

Sets the link's source.

Parameters

source

string | PointXY | DiagramCell

Returns

void


setTarget()

setTarget(target): void

Sets the link's target.

Parameters

target

string | PointXY | DiagramCell

Returns

void


toBack()

toBack(): void

Send this link to the back.

Returns

void


toFront()

toFront(): void

Bring this link to the front.

Returns

void


update()

update(updates): void

Update the link's backing data.

Parameters

updates

ObjectData

Returns

void

Properties

$destroyed

$destroyed: boolean = false

This is set when the link has been destroyed, ie. the underlying edge cell was removed from the data model.