We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't set attr parameters and its values when creating a new instance of the Custom Node class.
from diagrams.custom import Custom rabbitmq_icon = "icons/rabbitmq_icon.png" test = Custom("crawler_news_kazee_q", rabbitmq_icon,pin="true",pos="4,2")
Error notification
TypeError: Custom.__init__() got an unexpected keyword argument 'pin'
The original codes for custom node class is:
""" 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)
""" 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, **attrs): self._icon = icon_path super().__init__(label,**attrs)
The text was updated successfully, but these errors were encountered:
@iazulkarnain-tlkm @mingrammer This was fixed already in #437 and can be closed.
Sorry, something went wrong.
No branches or pull requests
The Problem
I can't set attr parameters and its values when creating a new instance of the Custom Node class.
How to reproduce the problem
Error notification
Original codes
The original codes for custom node class is:
Proposed Fix:
The text was updated successfully, but these errors were encountered: