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

pull/61/head
mingrammer 6 years ago
parent 012b4b4f26
commit 0d950df8e9

@ -445,8 +445,11 @@ class Edge:
self._attrs["xlabel"] = label if label else xlabel self._attrs["xlabel"] = label if label else xlabel
self._attrs["color"] = color self._attrs["color"] = color
self._attrs["style"] = style self._attrs["style"] = style
if fontcolor:
self._attrs["fontcolor"] = fontcolor self._attrs["fontcolor"] = fontcolor
if fontname:
self._attrs["fontname"] = fontname self._attrs["fontname"] = fontname
if fontsize:
self._attrs["fontsize"] = fontsize self._attrs["fontsize"] = fontsize
def __sub__(self, other: Union["Node", "Edge", List["Node"]]): def __sub__(self, other: Union["Node", "Edge", List["Node"]]):

Loading…
Cancel
Save