Bladeren bron

fix(edges): prevent the attrs from overwriting by empty string

tags/v0.7.1
mingrammer 4 jaren geleden
bovenliggende
commit
0d950df8e9
1 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. +6
    -3
      diagrams/__init__.py

+ 6
- 3
diagrams/__init__.py Bestand weergeven

@@ -445,9 +445,12 @@ class Edge:
self._attrs["xlabel"] = label if label else xlabel
self._attrs["color"] = color
self._attrs["style"] = style
self._attrs["fontcolor"] = fontcolor
self._attrs["fontname"] = fontname
self._attrs["fontsize"] = fontsize
if fontcolor:
self._attrs["fontcolor"] = fontcolor
if fontname:
self._attrs["fontname"] = fontname
if fontsize:
self._attrs["fontsize"] = fontsize

def __sub__(self, other: Union["Node", "Edge", List["Node"]]):
"""Implement Self - Node or Edge and Self - [Nodes]"""


Laden…
Annuleren
Opslaan