mingrammer/diagrams

Edge labels not placed with line

Open

#433 创建于 2021年1月8日

在 GitHub 查看
 (7 评论) (2 反应) (0 负责人)Python (2,701 fork)batch import
comp/edgeenhancementhelp wanted

仓库指标

Star
 (41,903 star)
PR 合并指标
 (平均合并 53天 15小时) (30 天内合并 5 个 PR)

描述

Green line labels not displaying correctly.

with Diagram("Diagram", outformat="svg") as diag:
    with Cluster("cluster01"):
        s1prox1 = ociVM("Proxy01")
        s1prox2 = ociVM("Proxy02")
        proxygrp = [ s1prox1, s1prox2 ]

    with Cluster("cluster02"):
        s1 = ociVM("s1")

    with Cluster("cluster02"):
        nfs1 = FileStorage("/nfs1")
        nfs2 = FileStorage("/nfs2")
        nfs3 = FileStorage("/nfs3")
        mounts = [nfs1,nfs2,nfs3]

    # s1 - s1prox1
    s1 - Edge(color="blue", style="bold") - proxygrp
    s1prox1 - Edge(color="blue", style="bold") - s1prox2
    s1 >> Edge(label="collect", color="green") >> mounts
    s1prox1 >> Edge(label="collect", color="green") >> mounts
    s1prox2 >> Edge(label="collect", color="green") >> mounts

diag

image

贡献者指南