@joint/react
    Preparing search index...

    Function linkLabel

    • Converts a simplified LinkLabel (text, color, position, …) into the dia.Link.Label JSON JointJS expects in a link's labels array.

      Parameters

      • label: LinkLabel

        The simplified link label to convert.

      Returns Label

      A JointJS label entry ready to drop into link.labels.

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

      const link = new LinkModel({
      source: { id: 'a' },
      target: { id: 'b' },
      labels: [linkLabel({ text: 'flows to', color: '#333', position: 0.5 })],
      });