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.
attrs
line
wrapper
style
link style to convert to SVG attributes
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' }),}); Copy
import { LinkModel, linkStyle } from '@joint/react';const link = new LinkModel({ source: { id: 'a' }, target: { id: 'b' }, attrs: linkStyle({ color: '#333', width: 2, targetMarker: 'arrow' }),});
Converts a LinkStyle into the JointJS SVG
attrsobject a link needs, keyed by thelineandwrapperselectors. Use it to set a link'sattrsdirectly, or rely on thestyleshorthand handled by linkAttributes.