File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 3434from wireviz .wv_gv_html import (
3535 html_bgcolor ,
3636 html_bgcolor_attr ,
37- html_caption ,
3837 html_colorbar ,
39- html_image ,
38+ html_image_rows ,
4039 html_line_breaks ,
4140 nested_html_table ,
4241 remove_links ,
@@ -203,8 +202,7 @@ def create_graph(self) -> Graph:
203202 translate_color (connector .color , self .options .color_mode ) if connector .color else None ,
204203 html_colorbar (connector .color )],
205204 '<!-- connector table -->' if connector .style != 'simple' else None ,
206- [html_image (connector .image )],
207- [html_caption (connector .image )]]
205+ * html_image_rows (connector .image )]
208206 # fmt: on
209207
210208 rows .extend (get_additional_component_table (self , connector ))
@@ -326,8 +324,7 @@ def create_graph(self) -> Graph:
326324 translate_color (cable .color , self .options .color_mode ) if cable .color else None ,
327325 html_colorbar (cable .color )],
328326 '<!-- wire table -->' ,
329- [html_image (cable .image )],
330- [html_caption (cable .image )]]
327+ * html_image_rows (connector .image )]
331328 # fmt: on
332329
333330 rows .extend (get_additional_component_table (self , cable ))
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ def html_colorbar(color: Color) -> str:
6464 return html_bgcolor (color , ' width="4"' ) if color else None
6565
6666
67+ def html_image_rows (image ):
68+ from wireviz .wv_bom import make_list
69+
70+ return sum ([[[html_image (i )], [html_caption (i )]] for i in make_list (image )], [])
71+
72+
6773def html_image (image ):
6874 from wireviz .DataClasses import Image
6975
You can’t perform that action at this time.
0 commit comments