Kaynağa Gözat

Make Cluster and alias of Node

pull/823/head
Bruno Meneguello 3 yıl önce
ebeveyn
işleme
f7dad6bb0e
1 değiştirilmiş dosya ile 1 ekleme ve 20 silme
  1. +1
    -20
      diagrams/__init__.py

+ 1
- 20
diagrams/__init__.py Dosyayı Görüntüle

@@ -477,25 +477,6 @@ class Node(_Cluster):
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:
"""Edge represents an edge between two nodes."""

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


Group = Cluster
Group = Cluster = Node

Yükleniyor…
İptal
Kaydet