@joint/react
    Preparing search index...

    Function linkStyle

    • Converts a LinkStyle into the JointJS SVG attrs object a link needs, keyed by the line and wrapper selectors. Use it to set a link's attrs directly, or rely on the style shorthand handled by linkAttributes.

      Parameters

      • style: LinkStyle = {}

        link style to convert to SVG attributes

      Returns Record<string, Nullable<attributes.SVGAttributes>>

      An attrs object with line and wrapper entries

      import { LinkModel, linkStyle } from '@joint/react';

      const link = new LinkModel({
      source: { id: 'a' },
      target: { id: 'b' },
      attrs: linkStyle({ color: '#333', width: 2, targetMarker: 'arrow' }),
      });