feat: add custom node class

pull/25/head
Daniel Ferrari 6 years ago
parent 05f1eb0ab0
commit d8723f422c
No known key found for this signature in database
GPG Key ID: 608F584627030FF0

@ -0,0 +1,20 @@
"""
Custom provides the possibility of load an image to be presented as a node.
"""
from diagrams import Node
class Custom(Node):
_provider = "custom"
_type = "custom"
_icon_dir = None
fontcolor = "#ffffff"
def _load_icon(self):
return self._icon
def __init__(self, label, icon_path):
self._icon = icon_path
super().__init__(label)
Loading…
Cancel
Save