浏览代码

Make Cluster and alias of Node

pull/823/head
Bruno Meneguello 3 年前
父节点
当前提交
f7dad6bb0e
共有 1 个文件被更改,包括 1 次插入20 次删除
  1. +1
    -20
      diagrams/__init__.py

+ 1
- 20
diagrams/__init__.py 查看文件

@@ -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

正在加载...
取消
保存