@joint/react
    Preparing search index...

    Class ReactElement<Attributes>

    A custom JointJS element that can render React components.

    Type Parameters

    • Attributes = dia.Element.Attributes

    Hierarchy

    • Element<dia.Element.Attributes & Attributes>
      • ReactElement
    Index

    Constructors

    Methods

    • Parameters

      • port: Port
      • Optionalopt: ModelSetOptions

      Returns this

    • Parameters

      • ports: Port[]
      • Optionalopt: ModelSetOptions

      Returns this

    • Parameters

      • graph: Graph
      • Optionalopt: Options

      Returns this

    • Parameters

      • Optionalkey: Path

      Returns any

    • Parameters

      • object: Selectors
      • Optionalopt: Options

      Returns this

    • Parameters

      • key: Path
      • value: any
      • Optionalopt: Options

      Returns this

    • Parameters

      • eventName: string
      • callback: EventHandler
      • Optionalcontext: any

      Returns this

    • Parameters

      • eventMap: EventMap
      • Optionalcontext: any

      Returns this

    • Parameters

      • cell: Cell<Attributes, ModelSetOptions> | Cell<Attributes, ModelSetOptions>[]

      Returns boolean

    • Return an object containing all the attributes that have changed, or false if there are no changed attributes. Useful for determining what parts of a view need to be updated and/or what attributes need to be persisted to the server. Unset attributes will be set to undefined. You can also pass an attributes object to diff against the model, determining if there would be a change.

      Parameters

      • Optionalattributes: Partial<Attributes & Attributes>

      Returns false | Partial<Attributes & Attributes>

    • Returns this

    • Parameters

      • opt: EmbeddableOptions<false>

      Returns this

    • Parameters

      • opt: EmbeddableOptions<true>

      Returns Cell<Attributes, ModelSetOptions>[]

    • Parameters

      • cell: Cell<Attributes, ModelSetOptions> | Cell<Attributes, ModelSetOptions>[]
      • Optionalopt: EmbedOptions

      Returns this

    • Parameters

      • Optionalopt: FitToChildrenOptions

      Returns this

    • Parameters

      • Optionalopt: FitParentOptions

      Returns this

    • Parameters

      • Optionalopt: FitToChildrenOptions

      Returns this

    • For strongly-typed access to attributes, use the get method only privately in public getter properties.

      Type Parameters

      • A extends string

      Parameters

      • attributeName: A

      Returns undefined | (Attributes & Attributes)[A]

      get name(): string {
      return super.get("name");
      }
    • Parameters

      • x: number
      • y: number

      Returns Point

    • Parameters

      • relativePoint: PlainPoint

      Returns Point

    • Returns Cell<Attributes, ModelSetOptions>[]

    • Parameters

      • attributes: { [key: string]: number }

      Returns number

    • Parameters

      • Optionalopt: GetEmbeddedCellsOptions

      Returns Cell<Attributes, ModelSetOptions>[]

    • Parameters

      • groupName: string

      Returns Port[]

    • Returns null | Cell<Attributes, ModelSetOptions>

    • Parameters

      • link: Link
      • endType: LinkEnd

      Returns Point

    • Parameters

      • angle: number
      • x: number
      • y: number

      Returns Point

    • Parameters

      • angle: number
      • point: PlainPoint

      Returns Point

    • Parameters

      • portId: string
      • Optionalopt: RotateOptions

      Returns Rect

    • Parameters

      • portId: string

      Returns Point

    • Parameters

      • port: string | Port

      Returns number

    • Parameters

      • portId: string

      Returns PortPosition

    • Parameters

      • portId: string

      Returns PortRect

    • Parameters

      • groupName: string

      Returns { [id: string]: PortPosition }

    • Parameters

      • x: number
      • y: number

      Returns Point

    • Parameters

      • absolutePoint: PlainPoint

      Returns Point

    • Parameters

      • before: string | number | Port
      • port: Port
      • Optionalopt: ModelSetOptions

      Returns this

    • Returns this is Element<Attributes, ModelSetOptions>

    • Parameters

      • cell: Cell
      • Optionalopt: EmbeddableOptions<boolean>

      Returns boolean

    • Returns this is Link<Attributes, ModelSetOptions>

    • Parameters

      • object: any
      • events: string
      • callback: EventHandler

      Returns this

    • Parameters

      • object: any
      • eventMap: EventMap

      Returns this

    • Parameters

      • object: any
      • events: string
      • callback: EventHandler

      Returns this

    • Parameters

      • object: any
      • eventMap: EventMap

      Returns this

    • Parameters

      • OptionaleventName: null | string
      • Optionalcallback: null | EventHandler
      • Optionalcontext: any

      Returns this

    • Parameters

      • eventName: string
      • callback: EventHandler
      • Optionalcontext: any

      Returns this

    • Parameters

      • eventMap: EventMap
      • Optionalcontext: any

      Returns this

    • Parameters

      • events: string
      • callback: EventHandler
      • Optionalcontext: any

      Returns this

    • Parameters

      • eventMap: EventMap
      • Optionalcontext: any

      Returns this

    • Parameters

      • portId: string
      • path: Path

      Returns any

    • Parameters

      • portId: string
      • path: Path
      • Optionalvalue: any
      • Optionalopt: ModelSetOptions

      Returns Element

    • Parameters

      • Optionalopt: PositionOptions

      Returns Point

    • Parameters

      • x: number
      • y: number
      • Optionalopt: PositionOptions

      Returns this

    • For use with models as ES classes. If you define a preinitialize method, it will be invoked when the Model is first created, before any instantiation logic is run for the Model.

      Parameters

      • Optionalattributes: Attributes & Attributes
      • Optionaloptions: any

      Returns void

    • Parameters

      • key: Path

      Returns any

    • Parameters

      • object: DeepPartial<A>
      • Optionalopt: Options

      Returns this

    • Parameters

      • key: Path
      • value: any
      • Optionalopt: Options

      Returns this

    • Parameters

      • Optionalopt: DisconnectableOptions

      Returns this

    • Parameters

      • path: Path
      • Optionalopt: Options

      Returns this

    • Parameters

      • port: string | Port
      • Optionalopt: ModelSetOptions

      Returns this

    • Parameters

      • Optionalopt: ModelSetOptions

      Returns this

    • Parameters

      • ports: (string | Port)[]
      • Optionalopt: ModelSetOptions

      Returns this

    • Parameters

      • path: Path
      • Optionalopt: Options

      Returns this

    • Parameters

      • width: number
      • height: number
      • Optionalopt: ResizeOptions

      Returns this

    • Parameters

      • deg: number
      • Optionalabsolute: boolean
      • Optionalorigin: PlainPoint
      • Optionalopt: { [key: string]: any }

      Returns this

    • Parameters

      • scaleX: number
      • scaleY: number
      • Optionalorigin: PlainPoint
      • Optionalopt: { [key: string]: any }

      Returns this

    • For strongly-typed assignment of attributes, use the set method only privately in public setter properties.

      Type Parameters

      • A extends string

      Parameters

      • attributeName: A
      • Optionalvalue: (Attributes & Attributes)[A]
      • Optionaloptions: ModelSetOptions

      Returns this

      set name(value: string) {
      super.set("name", value);
      }
    • For strongly-typed assignment of attributes, use the set method only privately in public setter properties.

      Parameters

      • attributeName: Partial<T>
      • Optionaloptions: ModelSetOptions

      Returns this

      set name(value: string) {
      super.set("name", value);
      }
    • For strongly-typed assignment of attributes, use the set method only privately in public setter properties.

      Type Parameters

      • A extends string

      Parameters

      • attributeName: Partial<Attributes & Attributes> | A
      • Optionalvalue: ModelSetOptions | (Attributes & Attributes)[A]
      • Optionaloptions: ModelSetOptions

      Returns this

      set name(value: string) {
      super.set("name", value);
      }
    • Returns Size

    • Parameters

      • size: Partial<Size>
      • Optionalopt: ResizeOptions

      Returns this

    • Parameters

      • width: number
      • height: number
      • Optionalopt: ResizeOptions

      Returns this

    • Parameters

      • name: string
      • Optionalopt: Options

      Returns this

    • Parameters

      • name: string
      • Optionalopt: Options

      Returns this

    • Parameters

      • Optionalobject: any
      • Optionalevents: string
      • Optionalcallback: EventHandler

      Returns this

    • Parameters

      • Optionalpath: string
      • Optionaldelim: string

      Returns this

    • Parameters

      • Optionalopt: ToFrontAndBackOptions

      Returns this

    • Parameters

      • Optionalopt: ToFrontAndBackOptions

      Returns this

    • Parameters

      • path: string
      • Optionalvalue: any
      • Optionalopt: TransitionOptions
      • Optionaldelim: string

      Returns number

    • Parameters

      • tx: number
      • Optionalty: number
      • Optionalopt: TranslateOptions

      Returns this

    • Parameters

      • eventName: string
      • ...args: any[]

      Returns this

    • Parameters

      • OptionaleventName: string
      • Optionalcallback: EventHandler
      • Optionalcontext: any

      Returns this

    • Parameters

      • cell: Cell<Attributes, ModelSetOptions> | Cell<Attributes, ModelSetOptions>[]
      • Optionalopt: Options

      Returns this

    • Parameters

      • attribute: _StringKey<Attributes & Attributes>
      • Optionaloptions: Silenceable

      Returns this

    • Parameters

      • attributes: Partial<T>
      • Optionaloptions: any

      Returns any

    • Parameters

      • type: string
      • Optionaldefaults: any
      • OptionalprotoProps: any
      • OptionalstaticProps: any

      Returns Constructor<Element<Attributes, ModelSetOptions>>

    • Do not use, prefer TypeScript's extend functionality.

      Parameters

      • properties: any
      • OptionalclassProperties: any

      Returns any

    Properties

    attributes: Partial<T>
    changed: Partial<T>
    cid: string
    cidPrefix: string
    collection: Collection<ReactElement<Attributes>>
    graph: Graph
    id: ID
    idAttribute: string
    markup: string | MarkupJSON = elementMarkup
    useCSSSelectors: boolean
    validationError: any
    attributes: {
        [attributeName: string]: PresentationAttributeDefinition<
            ElementView<Element<Attributes, ModelSetOptions>>,
        >;
    }