The `Remove` link tool renders a remove button at a given position along the link. It accepts five additional arguments, which can be passed as an object to the link tool constructor:

distance | number | Distance at which the button should be placed. Negative numbers are accepted; then the distance is counted from the end of the link. Default is `60`.
string | Percentage strings (e.g. `'40%'`) are also accepted.
rotate | boolean | Should the button rotate according to the slope of the link at the position specified by `distance`? Default is `false`.
offset | number | Relative offset of the button from the link. Positive numbers mean that the button should be offset to the right of the link (relative to the direction from source to target); negative numbers mean that the button should be offset to the left of the link (relative to the direction from source to target). Default is `0`.

action

function

What should happen when the user clicks the remove button? Default:

    function(evt) {
        this.model.remove({ ui: true, tool: this.cid });
    }

The callback function is expected to have the signature `function(evt)` where `evt` is a `jQuery.Event` object. The button view is available inside the function as `this`; the button model is available as `this.model`.

markup

JSONMarkup

The markup of the button, provided in the JointJS JSON format. Default:

    [{
        tagName: 'circle',
        selector: 'button',
        attributes: {
            'r': 7,
            'fill': '#FF1D00',
            'cursor': 'pointer'
        }
    }, {
        tagName: 'path',
        selector: 'icon',
        attributes: {
            'd': 'M -3 -3 3 3 M -3 3 3 -3',
            'fill': 'none',
            'stroke': '#FFFFFF',
            'stroke-width': 2,
            'pointer-events': 'none'
        }
    }]

Example:

    var removeButton = new joint.linkTools.Remove({
        focusOpacity: 0.5,
        rotate: true,
        distance: -20,
        offset: 20
    });