The view for the joint.dia.Link model. It inherits from joint.dia.CellView and is responsible for:
To find the view associated with a specific link (model), use the findViewByModel method of the paper.
var linkView = paper.findViewByModel(link);
It is possible to use a custom link view for all your links in a paper. This can be set up via the linkView
option on the paper object. There are a couple of options that you can use when you inherit from joint.dia.LinkView
and decide to use your own link view instead. These options are:
40
.doubleLinkTools
to true
, you can force the link view to create a copy of the link tools and position it on the other end of the link. Note that this happens only if the link gets longer than longLinkLength
.doubleLinkTools
is set to true
, a copy of the link tools will be rendered on the other end of the link.40
.60
. This makes only sense if doubleLinkTools
is set to true
.Example:
var paper = new joint.dia.Paper({
linkView: joint.dia.LinkView.extend({
options: _.defaults({
doubleLinkTools: true
}, joint.dia.LinkView.prototype.options)
})
});