Connect
The Connect
tool allows the user to create links in a drag & drop fashion. The tool extends the Button tool and accepts additional arguments, which can be passed as an object to the connect tool constructor:
magnet | string SVGElement (view: dia.LinkView) => SVGElement | Choose the source magnet of the link view which the new link should be connected to.
The callback function is expected to have the signature |
---|
Example:
const connectButton = new joint.elementTools.Connect({
x: '100%',
y: '0%',
offset: { x: -5, y: -5 },
magnet: 'body'
});