linkStyleWrapper()
function linkStyleWrapper(style?): Nullable<attributes.SVGAttributes>;
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.
Parameters
| Parameter | Type | Description |
|---|---|---|
style | LinkStyle | link style to convert to SVG attributes |
Returns
Nullable<attributes.SVGAttributes>
SVG attributes for the wrapper selector
Example
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) },
});