Builds the SVG attrs for a link's wrapper, the wide invisible path around the visible line that catches pointer events, from a LinkStyle. This is the wrapper half of linkStyle; reach for it when you style the line and wrapper selectors separately.
attrs
wrapper
link style to convert to SVG attributes
SVG attributes for the wrapper selector
import { LinkModel, linkStyleLine, linkStyleWrapper } from '@joint/react';const style = { color: '#333', width: 2 };const link = new LinkModel({ source: { id: 'a' }, target: { id: 'b' }, attrs: { line: linkStyleLine(style), wrapper: linkStyleWrapper(style) },}); Copy
import { LinkModel, linkStyleLine, linkStyleWrapper } from '@joint/react';const style = { color: '#333', width: 2 };const link = new LinkModel({ source: { id: 'a' }, target: { id: 'b' }, attrs: { line: linkStyleLine(style), wrapper: linkStyleWrapper(style) },});
Builds the SVG
attrsfor a link'swrapper, the wide invisible path around the visible line that catches pointer events, from a LinkStyle. This is thewrapperhalf of linkStyle; reach for it when you style the line and wrapper selectors separately.