GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — EdgeStyleRegistryInterface | @maxgraph/core

  • EdgeStyleRegistryInterface

Interface EdgeStyleRegistryInterface

The definition of a registry that stores the EdgeStyleFunctions and their configuration.

Since

0.20.0

interface EdgeStyleRegistryInterface {
    add(
        name: string,
        edgeStyle: EdgeStyleFunction,
        metaData?: EdgeStyleMetaData,
    ): void;
    allowsIntermediateHandles(edgeStyle?: EdgeStyleFunction | null): boolean;
    get(name: string | null | undefined): EdgeStyleFunction | null;
    getHandlerKind(edgeStyle?: EdgeStyleFunction | null): EdgeStyleHandlerKind;
    getName(value: EdgeStyleFunction | null): string | null;
    isOrthogonal(edgeStyle?: EdgeStyleFunction | null): boolean;
}

Hierarchy (View Summary)

  • Registry<EdgeStyleFunction>
    • EdgeStyleRegistryInterface
  • Defined in types.ts:1662
Index

Methods

add allowsIntermediateHandles get getHandlerKind getName isOrthogonal

Methods

add

  • add(
        name: string,
        edgeStyle: EdgeStyleFunction,
        metaData?: EdgeStyleMetaData,
    ): void

    Register an EdgeStyleFunction under the given name along with its EdgeStyleMetaData.

    The metadata is used by maxGraph to drive edge handling behaviors (handler kind, orthogonal projection on perimeter, intermediate bend handles). Make sure to pass the correct values, as omitting or mis-setting them may lead to unexpected behaviors when editing or rendering the edge.

    To register edge styles provided by maxGraph, prefer the dedicated helpers which already provide the correct metadata:

    • registerElbowEdgeStyle
    • registerEntityRelationEdgeStyle
    • registerLoopEdgeStyle
    • registerManhattanEdgeStyle
    • registerOrthogonalEdgeStyle
    • registerSegmentEdgeStyle
    • registerSideToSideEdgeStyle
    • registerTopToBottomEdgeStyle

    Or registerDefaultEdgeStyles to register all of them at once.

    Parameters

    • name: string

      the key under which the edgeStyle is registered.

    • edgeStyle: EdgeStyleFunction

      the EdgeStyleFunction to register.

    • OptionalmetaData: EdgeStyleMetaData

      the optional EdgeStyleMetaData associated with edgeStyle.

    Returns void

    Overrides Registry.add

    • Defined in types.ts:1687

allowsIntermediateHandles

  • allowsIntermediateHandles(edgeStyle?: EdgeStyleFunction | null): boolean

    Retrieves whether the specified edgeStyle allows intermediate bend handles.

    If the edgeStyle is not registered or the allowIntermediateHandles was not set during registration, this method returns true.

    Parameters

    • OptionaledgeStyle: EdgeStyleFunction | null

    Returns boolean

    Since

    0.24.0

    • Defined in types.ts:1709

get

  • get(name: string | null | undefined): EdgeStyleFunction | null

    Parameters

    • name: string | null | undefined

    Returns EdgeStyleFunction | null

    Inherited from Registry.get

    • Defined in types.ts:1606

getHandlerKind

  • getHandlerKind(edgeStyle?: EdgeStyleFunction | null): EdgeStyleHandlerKind

    Retrieves the handler kind of the specified edgeStyle as it was registered.

    If the edgeStyle is not registered or the handlerKind was not set during registration, this method returns 'default'.

    Parameters

    • OptionaledgeStyle: EdgeStyleFunction | null

    Returns EdgeStyleHandlerKind

    • Defined in types.ts:1701

getName

  • getName(value: EdgeStyleFunction | null): string | null

    Parameters

    • value: EdgeStyleFunction | null

    Returns string | null

    Inherited from Registry.getName

    • Defined in types.ts:1608

isOrthogonal

  • isOrthogonal(edgeStyle?: EdgeStyleFunction | null): boolean

    Retrieves the orthogonal state of the specified edgeStyle as it was registered.

    If the edgeStyle is not registered or the orthogonal state was not set during registration, this method returns false.

    Parameters

    • OptionaledgeStyle: EdgeStyleFunction | null

    Returns boolean

    • Defined in types.ts:1694

Settings

Member Visibility
  • Protected
  • Inherited
Theme

On This Page

Methods
addallowsIntermediateHandlesgetgetHandlerKindgetNameisOrthogonal
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.