isVisible method
This predicate is true if this Part can be seen. Parts that can be seen can be manipulated by the user, can take space in the document, or can take part in a layout, among many possibilities. Note that the value of this predicate can often be false even while GraphObject#visible is true.
A Part is not seen if it is not GraphObject#visible or if it is in a Layer that is not Layer#visible.
If a Part is a member of a Group and the Group is not Group#isSubGraphExpanded, the part is not seen. (The containing Group might still be visible.)
If a Node is a "tree child" of a Node that is not Node#isTreeExpanded, the node is not seen. (The parent Node might still be visible.)
If a Link is connected to or from a Node that is not isVisible()
and is not a member of a Group that isVisible()
, the link is not seen.
If a Node is a "link label" of a Link and that Link is not isVisible()
, the node is not seen.
This is different from GraphObject#isVisibleObject, which ignores whether the Layer is visible and just checks GraphObject#visible up the chain of containing Panels.
If you want to know whether a Part is in the Diagram's viewport, try:
diagram.viewportBounds.containsRect(part.actualBounds);
or:
diagram.viewportBounds.intersectsRect(part.actualBounds);
@expose @return {boolean} true if GraphObject#visible is true and if Layer#visible is true.
Implementation
_i2.bool isVisible() => _i4.callMethod(
this,
'isVisible',
[],
);