Skip to content

Commit

Permalink
update tree-of-life demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kumilingus committed Aug 14, 2024
1 parent 69f6566 commit fea5482
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/tree-of-life/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ class Branch extends dia.Link {
// The `organicStroke` attribute is used to set the `d` attribute of the `<path>` element.
// It works similarly to the `connection` attribute of JointJS.
organicStroke: {
qualify: function () {
return this.model.isLink();
},
set: function (
_value: any,
_refBBox: g.Rect,
_node: SVGElement,
attrs: attributes.NativeSVGAttributes
) {
if (!this.model.isLink()) {
throw new Error('The `organicStroke` attribute can only be used with links.');
}
// The path of the link as returned by the `connector`.
const path = this.getConnection();
const segmentSubdivisions = this.getConnectionSubdivisions();
Expand Down

0 comments on commit fea5482

Please sign in to comment.