pull/106/merge
Cory O'Daniel 5 years ago committed by GitHub
commit 7021551db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -39,7 +39,7 @@ def setcluster(cluster):
class Diagram:
__directions = ("TB", "BT", "LR", "RL")
__outformats = ("png", "jpg", "svg", "pdf")
__outformats = ("png", "jpg", "svg", "pdf", "cmapx")
# fmt: off
_default_graph_attrs = {
@ -267,10 +267,11 @@ class Node:
_height = 1.9
def __init__(self, label: str = ""):
def __init__(self, label: str = "", URL: str = "", tooltip: str = ""):
"""Node represents a system component.
:param label: Node label.
:param URL: Node URL link. (svg, cmapx only)
"""
# Generates an ID for identifying a node.
self._id = self._rand_id()
@ -288,6 +289,8 @@ class Node:
} if self._icon else {}
# fmt: on
self.attrs.update({"URL": URL, "tooltip": tooltip})
# Node must be belong to a diagrams.
self._diagram = getdiagram()
if self._diagram is None:

Loading…
Cancel
Save