From 093b04a1189634257a7372f534eb45de615f7340 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Thu, 2 Jul 2020 19:09:27 +0200 Subject: [PATCH] Fine-tune cable appearance Add hack to make manufacturer / part number row have vertical separators, to be visually consistent with connectors. In the future, connectors will have to be modified to be HTML tables instead of GraphViz record nodes, in order to support colored bands for the connector, or individual pins (#53). When this is implemented, a cleaner solution should be found for both connectors and cables. --- src/wireviz/Harness.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index 231e583d..c0df0aa9 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -158,9 +158,11 @@ def create_graph(self): if cable.show_name: html = f'{html}{cable.name}' if(len(identification) > 0): # print an identification row if values specified - html = f'{html}' - for attrib in identification: - html = f'{html}' + html = f'{html}' # end identification row html = f'{html}' # attribute row for attrib in attributes:
{attrib}
' + for attrib in identification[0:-1]: + html = f'{html}' # all columns except last have a border on the right (sides="R") + if len(identification) > 0: + html = f'{html}' # last column has no border on the right because the enclosing table borders it html = f'{html}
{attrib}{identification[-1]}