Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • mxCellRenderer

Index

Constructors

constructor

Properties

antiAlias

antiAlias: boolean

Variable: antiAlias

Anti-aliasing option for new shapes. Default is true.

defaultEdgeShape

defaultEdgeShape: mxConnector

Variable: defaultEdgeShape

Defines the default shape for edges. Default is .

defaultShapes

defaultShapes: Object

Variable: defaultShapes

Static array that contains the globally registered shapes which are known to all instances of this class. For adding new shapes you should use the static <mxCellRenderer.registerShape> function.

defaultTextShape

defaultTextShape: mxText

Variable: defaultTextShape

Defines the default shape for labels. Default is .

defaultVertexShape

defaultVertexShape: mxRectangleShape

Variable: defaultVertexShape

Defines the default shape for vertices. Default is .

forceControlClickHandler

forceControlClickHandler: boolean

Variable: forceControlClickHandler

Specifies if the enabled state of the graph should be ignored in the control click handler (to allow folding in disabled graphs). Default is false.

legacyControlPosition

legacyControlPosition: boolean

Variable: legacyControlPosition

Specifies if the folding icon should ignore the horizontal orientation of a swimlane. Default is true.

legacySpacing

legacySpacing: boolean

Variable: legacySpacing

Specifies if spacing and label position should be ignored if overflow is fill or width. Default is true for backwards compatiblity.

minSvgStrokeWidth

minSvgStrokeWidth: number

Variable: minSvgStrokeWidth

Minimum stroke width for SVG output.

Methods

checkPlaceholderStyles

  • Function: checkPlaceholderStyles

    Resolves special keywords 'inherit', 'indicated' and 'swimlane' and sets the respective color on the shape.

    Parameters

    Returns boolean

configureShape

  • Function: configureShape

    Configures the shape for the given cell state.

    Parameters:

    state - for which the shape should be configured.

    Parameters

    Returns void

createCellOverlays

  • Function: createCellOverlays

    Creates the actual shape for showing the overlay for the given cell state.

    Parameters:

    state - for which the overlay should be created.

    Parameters

    Returns void

createControl

  • Function: createControl

    Creates the control for the given cell state.

    Parameters:

    state - for which the control should be created.

    Parameters

    Returns void

createControlClickHandler

  • Function: createControlClickHandler

    Hook for creating the click handler for the folding icon.

    Parameters:

    state - whose control click handler should be returned.

    Parameters

    Returns void

createIndicatorShape

  • Function: createIndicatorShape

    Creates the indicator shape for the given cell state.

    Parameters:

    state - for which the indicator shape should be created.

    Parameters

    Returns void

createLabel

  • Function: createLabel

    Creates the label for the given cell state.

    Parameters:

    state - for which the label should be created.

    Parameters

    Returns void

createShape

destroy

  • Function: destroy

    Destroys the shapes associated with the given cell state.

    Parameters:

    state - for which the shapes should be destroyed.

    Parameters

    Returns void

doRedrawShape

getControlBounds

getLabelBounds

getLabelValue

  • Function: getLabelValue

    Returns the value to be used for the label.

    Parameters:

    state - for which the label should be created.

    Parameters

    Returns string

getShape

getShapeConstructor

getShapesForState

  • Function: getShapesForState

    Returns the for the given cell state in the order in which they should appear in the DOM.

    Parameters:

    state - whose shapes should be returned.

    Parameters

    Returns mxShape[]

getTextScale

  • Function: getTextScale

    Returns the scaling used for the label of the given state

    Parameters:

    state - whose label scale should be returned.

    Parameters

    Returns number

initControl

  • initControl(state: mxCellState, control: mxShape, handleEvents: boolean, clickHandler?: Function): Element
  • Function: initControl

    Initializes the given control and returns the corresponding DOM node.

    Parameters:

    state - for which the control should be initialized. control - to be initialized. handleEvents - Boolean indicating if mousedown and mousemove should fire events via the graph. clickHandler - Optional function to implement clicks on the control.

    Parameters

    • state: mxCellState
    • control: mxShape
    • handleEvents: boolean
    • Optional clickHandler: Function

    Returns Element

initializeLabel

initializeOverlay

  • Function: initializeOverlay

    Initializes the given overlay.

    Parameters:

    state - for which the overlay should be created. overlay - that represents the overlay.

    Parameters

    Returns void

initializeShape

  • Function: initializeShape

    Initializes the shape in the given state by calling its init method with the correct container after configuring it using .

    Parameters:

    state - for which the shape should be initialized.

    Parameters

    Returns void

insertStateAfter

  • insertStateAfter(state: mxCellState, node: Element, htmlNode: HTMLElement): void
  • Function: insertStateAfter

    Inserts the given array of after the given nodes in the DOM.

    Parameters:

    shapes - Array of to be inserted. node - Node in after which the shapes should be inserted. htmlNode - Node in the graph container after which the shapes should be inserted that will not go into the (eg. HTML labels without foreignObjects).

    Parameters

    • state: mxCellState
    • node: Element
    • htmlNode: HTMLElement

    Returns void

installCellOverlayListeners

installListeners

  • Function: installListeners

    Installs the event listeners for the given cell state.

    Parameters:

    state - for which the event listeners should be isntalled.

    Parameters

    Returns void

isLabelEvent

  • isLabelEvent(state: mxCellState, evt: MouseEvent): boolean
  • Function: isLabelEvent

    Returns true if the event is for the label of the given state. This implementation always returns true.

    Parameters:

    state - whose label fired the event. evt - Mouse event which was fired.

    Parameters

    Returns boolean

isShapeEvent

  • isShapeEvent(state: mxCellState, evt: MouseEvent): boolean
  • Function: isShapeEvent

    Returns true if the event is for the shape of the given state. This implementation always returns true.

    Parameters:

    state - whose shape fired the event. evt - Mouse event which was fired.

    Parameters

    Returns boolean

isShapeInvalid

isTextShapeInvalid

  • Function: isTextShapeInvalid

    Returns true if the style for the text shape has changed.

    Parameters:

    state - whose label should be checked. shape - shape to be checked.

    Parameters

    Returns boolean

postConfigureShape

  • Function: postConfigureShape

    Replaces any reserved words used for attributes, eg. inherit, indicated or swimlane for colors in the shape for the given state. This implementation resolves these keywords on the fill, stroke and gradient color keys.

    Parameters

    Returns void

redraw

  • redraw(state: mxCellState, force?: boolean, rendering?: boolean): void
  • Function: redraw

    Updates the bounds or points and scale of the shapes for the given cell state. This is called in mxGraphView.validatePoints as the last step of updating all cells.

    Parameters:

    state - for which the shapes should be updated. force - Optional boolean that specifies if the cell should be reconfiured and redrawn without any additional checks. rendering - Optional boolean that specifies if the cell should actually be drawn into the DOM. If this is false then redraw and/or reconfigure will not be called on the shape.

    Parameters

    • state: mxCellState
    • Optional force: boolean
    • Optional rendering: boolean

    Returns void

redrawCellOverlays

  • redrawCellOverlays(state: mxCellState, forced?: boolean): void
  • Function: redrawCellOverlays

    Redraws the overlays for the given cell state.

    Parameters:

    state - whose overlays should be redrawn.

    Parameters

    Returns void

redrawControl

  • redrawControl(state: mxCellState, forced?: boolean): void
  • Function: redrawControl

    Redraws the control for the given cell state.

    Parameters:

    state - whose control should be redrawn.

    Parameters

    Returns void

redrawLabel

  • redrawLabel(state: mxCellState, forced?: boolean): void
  • Function: redrawLabel

    Redraws the label for the given cell state.

    Parameters:

    state - whose label should be redrawn.

    Parameters

    Returns void

redrawLabelShape

  • redrawLabelShape(shape: mxText): void
  • Function: redrawLabelShape

    Called to invoked redraw on the given text shape.

    Parameters:

    shape - shape to be redrawn.

    Parameters

    Returns void

redrawShape

  • redrawShape(state: mxCellState, force?: boolean, rendering?: boolean): void
  • Function: redrawShape

    Redraws the shape for the given cell state.

    Parameters:

    state - whose label should be redrawn.

    Parameters

    • state: mxCellState
    • Optional force: boolean
    • Optional rendering: boolean

    Returns void

resolveColor

  • resolveColor(state: mxCellState, field: string, key: string): void
  • Function: resolveColor

    Resolves special keywords 'inherit', 'indicated' and 'swimlane' and sets the respective color on the shape.

    Parameters

    Returns void

rotateLabelBounds

  • Function: rotateLabelBounds

    Adds the shape rotation to the given label bounds and applies the alignment and offsets.

    Parameters:

    state - whose label bounds should be rotated. bounds - the rectangle to be rotated.

    Parameters

    Returns void

Static registerShape

  • registerShape(key: string, shape: new (...args: any) => mxShape): void
  • Registers the given constructor under the specified key in this instance of the renderer.

    example
    mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape);
    

    Parameters

    • key: string

      the shape name.

    • shape: new (...args: any) => mxShape

      constructor of the mxShape subclass.

        • Parameters

          • Rest ...args: any

          Returns mxShape

    Returns void

Generated using TypeDoc