Skip to content

[Bug]: Link's getBBox returns incorrect value #2820

@frnora

Description

@frnora

I need to use the bboxes of the links to be able to clip them.

I simply tried: link.getBBox() which seems to return an incorrect value.

Further investigation reveals that getPointFromConnectedLink always returns on this line if there is no port id: if (!portId || !this.hasPort(portId)) return center;

Why is the endDef not taken into account in this case and instead it takes the center of the element(s)?

Thanks.

Steps to reproduce

  1. Create two elements
  2. Link them
  3. Modify the anchor points of the link
  4. link.getBBox() returns incorrect values

Version

4.0.1 jointplus

bbox

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions