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.
ports
groups
items
'main'
Map of port id to its ElementPort description.
Optional
Shared defaults merged under each port; per-port values win.
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)' } }); Copy
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)' } });
Expands a map of declarative ElementPorts into a full JointJS
portsobject (agroupsdefinition plus theitemsarray). Every port is placed absolutely under a single'main'group, keyed by its map id.