Explorar el Código

fix(edge): misaligned label text position

tags/v0.15.0
mingrammer hace 4 años
padre
commit
91a2910026
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. +3
    -2
      diagrams/__init__.py

+ 3
- 2
diagrams/__init__.py Ver fichero

@@ -171,7 +171,7 @@ class Diagram:
self.dot.subgraph(dot)

def render(self) -> None:
self.dot.render(format=self.outformat, view=self.show)
self.dot.render(format=self.outformat, view=self.show, quiet=True)


class Cluster:
@@ -445,7 +445,8 @@ class Edge:

if label:
# Graphviz complaining about using label for edges, so replace it with xlabel.
self._attrs["xlabel"] = label
# Update: xlabel option causes the misaliend label position: https://github.com/mingrammer/diagrams/issues/83
self._attrs["label"] = label
if color:
self._attrs["color"] = color
if style:


Cargando…
Cancelar
Guardar