From c23679dd7be0accc918c696e203fe8efba315ebb Mon Sep 17 00:00:00 2001 From: KV Date: Sun, 16 Aug 2020 16:22:56 +0200 Subject: [PATCH] Add info about Image dataclass - Add Optional keyword and value alternatives as requested in review. - Add a few extra comments about the attributes. --- src/wireviz/DataClasses.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wireviz/DataClasses.py b/src/wireviz/DataClasses.py index a1df6ff..6ffc044 100644 --- a/src/wireviz/DataClasses.py +++ b/src/wireviz/DataClasses.py @@ -9,12 +9,16 @@ from wireviz import wv_colors @dataclass class Image: + # Attributes of the image object : src: str - scale: str = "false" + scale: Optional[str] = "false" # false | true | width | height | both + # Attributes of the image cell containing the image: width: Optional[int] = None height: Optional[int] = None - fixedsize: bool = False + fixedsize: Optional[bool] = False + # Contents of the cell just below the image cell: caption: Optional[str] = None + # See also HTML doc at https://graphviz.org/doc/info/shapes.html#html @dataclass