Explorar el Código

ability to add icons to the cluster label

pull/438/head
Georgi Ivanov hace 4 años
committed by tessier
padre
commit
f318707537
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. +5
    -5
      diagrams/__init__.py

+ 5
- 5
diagrams/__init__.py Ver fichero

@@ -53,7 +53,7 @@ class _Cluster:
except LookupError:
self._parent = None

def __enter__(self):
setcluster(self)
return self
@@ -77,14 +77,14 @@ class _Cluster:
def node(self, node: "Node") -> None:
"""Create a new node."""
self.nodes[node.nodeid] = node
def remove_node(self, nodeid: str) -> None:
del self.nodes[nodeid]

def subgraph(self, subgraph: "_Cluster") -> None:
"""Create a subgraph for clustering"""
self.subgraphs.append(subgraph)
@property
def nodes_iter(self):
if self.nodes:
@@ -212,7 +212,7 @@ class Diagram(_Cluster):
setdiagram(self)
super().__enter__()
return self
def __exit__(self, *args):
super().__exit__(*args)
setdiagram(None)
@@ -456,7 +456,7 @@ class Node(_Cluster):
@property
def nodeid(self):
return self._id
# TODO: option for adding flow description to the connection edge
def connect(self, node: "Node", edge: "Edge"):
"""Connect to other node.


Cargando…
Cancelar
Guardar