Parcourir la source

Make Cluster and alias of Node

pull/823/head
Bruno Meneguello il y a 3 ans
Parent
révision
f7dad6bb0e
1 fichiers modifiés avec 1 ajouts et 20 suppressions
  1. +1
    -20
      diagrams/__init__.py

+ 1
- 20
diagrams/__init__.py Voir le fichier

@@ -477,25 +477,6 @@ class Node(_Cluster):
return None return None




class Cluster(Node):
def __init__(
self,
label: str = "",
direction: str = None,
icon: object = None,
icon_size: int = None,
**attrs: Dict
):
"""Cluster represents a cluster context.

:param label: Cluster label.
:param direction: Data flow direction. Default is "LR" (left to right).
:param icon: Custom icon for tihs cluster. Must be a node class or reference.
:param icon_size: The icon size. Default is 30.
"""
super().__init__(label, direction, icon, icon_size, **attrs)


class Edge: class Edge:
"""Edge represents an edge between two nodes.""" """Edge represents an edge between two nodes."""


@@ -615,4 +596,4 @@ class Edge:
return {**self._attrs, "dir": direction} return {**self._attrs, "dir": direction}




Group = Cluster
Group = Cluster = Node

Chargement…
Annuler
Enregistrer