Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrowConnectorShape

Extends Shape to implement an new rounded arrow shape with support for waypoints and double arrows. The shape is used to represent edges, not vertices.

This shape is registered under {@link mxConstants.SHAPE_ARROW_CONNECTOR} in {@link mxCellRenderer}.

Hierarchy

Index

Constructors

constructor

  • new ArrowConnectorShape(points: Point[], fill: string, stroke: string, strokeWidth?: number, arrowWidth?: number, spacing?: number, endSize?: number): ArrowConnectorShape

Properties

antiAlias

antiAlias: boolean = true

Rendering hint for configuring the canvas.

arrowSpacing

arrowSpacing: number

arrowWidth

arrowWidth: number

boundingBox

boundingBox: null | Rectangle = null

Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.

bounds

bounds: null | Rectangle = null

Holds the Rectangle that specifies the bounds of this shape.

cursor

cursor: string = ''

dialect

dialect: null | string = null

Holds the dialect in which the shape is to be painted. This can be one of the DIALECT constants in {@link Constants}.

direction

direction: DirectionValue = DIRECTION.EAST

endArrow

endArrow: ArrowType = NONE

endSize

endSize: number = 1

fill

fill: string = NONE

fillOpacity

fillOpacity: number = 100

flipH

flipH: boolean = false

flipV

flipV: boolean = false

glass

glass: boolean = false

gradient

gradient: string = NONE

gradientDirection

gradientDirection: DirectionValue = DIRECTION.EAST

image

image: null | ImageBox = null

imageSrc

imageSrc: null | string = null

indicator

indicator: null | Shape = null

indicatorColor

indicatorColor: string = NONE

indicatorDirection

indicatorDirection: DirectionValue = DIRECTION.EAST

indicatorGradientColor

indicatorGradientColor: string = NONE

indicatorImageSrc

indicatorImageSrc: null | string = null

indicatorShape

indicatorShape: null | typeof Shape = null

indicatorStrokeColor

indicatorStrokeColor: string = NONE

isDashed

isDashed: boolean = false

isRounded

isRounded: boolean = false

isShadow

isShadow: boolean = false

minSvgStrokeWidth

minSvgStrokeWidth: number = 1

Minimum stroke width for SVG output.

node

node: SVGGElement

Holds the outermost DOM node that represents this shape.

oldGradients

oldGradients: GradientMap = {}

opacity

opacity: number = 100

originalPointerEvents

originalPointerEvents: null | boolean = null

outline

outline: boolean = false

Specifies if the shape should be drawn as an outline. This disables all fill colors and can be used to disable other drawing states that should not be painted for outlines. Default is false. This should be set before calling .

overlay

overlay: null | CellOverlay = null

pointerEvents

pointerEvents: boolean = true

Specifies if pointer events should be handled. Default is true.

points

points: (null | Point)[] = []

Holds the array of that specify the points of this shape.

preserveImageAspect

preserveImageAspect: boolean = false

rotation

rotation: number = 0

scale

scale: number = 1

Holds the scale in which the shape is being painted.

shapePointerEvents

shapePointerEvents: boolean = false

Specifies if pointer events outside of shape should be handled. Default is false.

spacing

spacing: number = 0

startArrow

startArrow: ArrowType = NONE

startSize

startSize: number = 1

state

state: null | CellState = null

Optional reference to the corresponding .

stencil

stencil: null | StencilShape = null

Holds the {@link Stencil} that defines the shape.

stencilPointerEvents

stencilPointerEvents: boolean = false

Specifies if pointer events outside of stencils should be handled. Default is false. Set this to true for backwards compatibility with the 1.x branch.

stroke

stroke: string = NONE

strokeOpacity

strokeOpacity: number = 100

strokeWidth

strokeWidth: number = 1

style

style: null | CellStateStyles = null

Optional reference to the style of the corresponding .

svgPointerEvents

svgPointerEvents: string = 'all'

Specifies if pointer events should be handled. Default is true.

svgStrokeTolerance

svgStrokeTolerance: number = 8

Event-tolerance for SVG strokes (in px). Default is 8. This is only passed to the canvas in if is true.

useSvgBoundingBox

useSvgBoundingBox: boolean = true

Allows to use the SVG bounding box in SVG.

defaultvalue

false for performance reasons.

verticalTextRotation

verticalTextRotation: number = 0

visible

visible: boolean = true

Specifies if the shape is visible. Default is true.

Methods

addPoints

  • addPoints(c: AbstractCanvas2D, pts: Point[], rounded?: boolean, arcSize: number, close?: boolean, exclude?: number[], initialMove?: boolean): void

afterPaint

apply

augmentBoundingBox

beforePaint

checkBounds

  • checkBounds(): null | boolean

clear

  • clear(): void

configureCanvas

  • configureCanvas(c: AbstractCanvas2D, x: number, y: number, w: number, h: number): void

create

  • create(): SVGGElement
  • Creates and returns the DOM node(s) for the shape in the given container. This implementation invokes , or depending on the and style settings.

    Returns SVGGElement

createBoundingBox

createCanvas

createSvgCanvas

createTransparentSvgRectangle

  • createTransparentSvgRectangle(x: number, y: number, w: number, h: number): SVGRectElement

destroy

  • destroy(): void
  • Destroys the shape by removing it from the DOM and releasing the DOM node associated with the shape using {@link Event#release}.

    Returns void

destroyCanvas

getArcSize

  • getArcSize(w: number, h: number): number

getCursor

  • getCursor(): string

getEdgeWidth

  • getEdgeWidth(): number

getEndArrowWidth

  • getEndArrowWidth(): number

getGradientBounds

getLabelBounds

getLabelMargins

getRotation

  • getRotation(): number

getShapeRotation

  • getShapeRotation(): number

getStartArrowWidth

  • getStartArrowWidth(): number

getSvgScreenOffset

  • getSvgScreenOffset(): number

getTextRotation

  • getTextRotation(): number

init

  • init(container: HTMLElement | SVGElement): void
  • Initializes the shape by creaing the DOM node using and adding it into the given container.

    Parameters

    • container: HTMLElement | SVGElement

      DOM node that will contain the shape.

    Returns void

initStyles

  • initStyles(): void

isArrowRounded

  • isArrowRounded(): boolean

isHtmlAllowed

  • isHtmlAllowed(): boolean

isMarkerEnd

  • isMarkerEnd(): boolean

isMarkerStart

  • isMarkerStart(): boolean

isOpenEnded

  • isOpenEnded(): boolean

isPaintBoundsInverted

  • isPaintBoundsInverted(): boolean

isRoundable

  • isRoundable(): boolean

paint

paintBackground

  • paintBackground(c: AbstractCanvas2D, x: number, y: number, w: number, h: number): void

paintEdgeShape

paintForeground

  • paintForeground(c: AbstractCanvas2D, x: number, y: number, w: number, h: number): void

paintGlassEffect

  • paintGlassEffect(c: AbstractCanvas2D, x: number, y: number, w: number, h: number, arc: number): void

paintMarker

  • paintMarker(c: AbstractCanvas2D, ptX: number, ptY: number, nx: number, ny: number, size: number, arrowWidth: number, edgeWidth: number, spacing: number, initialMove: boolean): void

paintVertexShape

  • paintVertexShape(c: AbstractCanvas2D, x: number, y: number, w: number, h: number): void

reconfigure

  • reconfigure(): void

redraw

  • redraw(): void

redrawHtmlShape

  • redrawHtmlShape(): void

redrawShape

  • redrawShape(): void

releaseSvgGradients

  • releaseSvgGradients(grads: GradientMap): void

resetStyles

  • resetStyles(): void

setCursor

  • setCursor(cursor: string): void

setTransparentBackgroundImage

  • setTransparentBackgroundImage(node: SVGElement): void

updateBoundingBox

  • updateBoundingBox(): void

updateBoundsFromPoints

  • updateBoundsFromPoints(): void

updateTransform

  • updateTransform(c: AbstractCanvas2D, x: number, y: number, w: number, h: number): void

Generated using TypeDoc