@joint/react
    Preparing search index...

    Function elementPorts

    • Expands a map of declarative ElementPorts into a full JointJS ports object (a groups definition plus the items array). Every port is placed absolutely under a single 'main' group, keyed by its map id.

      Parameters

      • ports: Record<string, ElementPort>

        Map of port id to its ElementPort description.

      • OptionalportStyle: Partial<ElementPort>

        Shared defaults merged under each port; per-port values win.

      Returns { groups: Record<string, dia.Element.PortGroup>; items: Port[] }

      The ports object to assign to an element's attributes.

      import { elementPorts } from '@joint/react';

      // One output port on the right edge, vertically centered.
      const ports = elementPorts({ out: { cx: 'calc(w)', cy: 'calc(h/2)' } });