src: wv_graphviz: remove bom bubble
This commit is contained in:
parent
9a4334e3d6
commit
ff746017b2
@ -42,7 +42,6 @@ def gv_node_component(component: Component) -> Table:
|
|||||||
|
|
||||||
if isinstance(component, Connector):
|
if isinstance(component, Connector):
|
||||||
line_info = [
|
line_info = [
|
||||||
bom_bubble(component.id),
|
|
||||||
html_line_breaks(component.type),
|
html_line_breaks(component.type),
|
||||||
html_line_breaks(component.subtype),
|
html_line_breaks(component.subtype),
|
||||||
f"{component.pincount}-pin" if component.show_pincount else None,
|
f"{component.pincount}-pin" if component.show_pincount else None,
|
||||||
@ -50,7 +49,6 @@ def gv_node_component(component: Component) -> Table:
|
|||||||
]
|
]
|
||||||
elif isinstance(component, Cable):
|
elif isinstance(component, Cable):
|
||||||
line_info = [
|
line_info = [
|
||||||
bom_bubble(component.id) if component.category != "bundle" else None,
|
|
||||||
html_line_breaks(component.type),
|
html_line_breaks(component.type),
|
||||||
f"{component.wirecount}x" if component.show_wirecount else None,
|
f"{component.wirecount}x" if component.show_wirecount else None,
|
||||||
component.gauge_str_with_equiv,
|
component.gauge_str_with_equiv,
|
||||||
@ -109,7 +107,6 @@ def gv_additional_component_table(component):
|
|||||||
rows.append(
|
rows.append(
|
||||||
Tr(
|
Tr(
|
||||||
[
|
[
|
||||||
Td(bom_bubble(subitem.id)),
|
|
||||||
Td(f"{bom_entry.qty.number}", align="right"),
|
Td(f"{bom_entry.qty.number}", align="right"),
|
||||||
Td(
|
Td(
|
||||||
f"{bom_entry.qty.unit if bom_entry.qty.unit else 'x'}",
|
f"{bom_entry.qty.unit if bom_entry.qty.unit else 'x'}",
|
||||||
@ -140,33 +137,6 @@ def calculate_node_bgcolor(component, harness_options):
|
|||||||
return harness_options.bgcolor_cable.html
|
return harness_options.bgcolor_cable.html
|
||||||
|
|
||||||
|
|
||||||
def bom_bubble(id) -> Table:
|
|
||||||
if id is None:
|
|
||||||
return None
|
|
||||||
else:
|
|
||||||
# TODO: activate BOM bubbles
|
|
||||||
#return None
|
|
||||||
# size and style of BOM bubble is optimized to be a rounded square,
|
|
||||||
# big enough to hold any two-digit ID without GraphViz warnings
|
|
||||||
text = id
|
|
||||||
# text = f'<FONT COLOR="#FFFFFF">{id}</FONT>'
|
|
||||||
return Table(
|
|
||||||
Tr(
|
|
||||||
Td(
|
|
||||||
text,
|
|
||||||
border=1,
|
|
||||||
cellpadding=0,
|
|
||||||
fixedsize="true",
|
|
||||||
style="rounded",
|
|
||||||
height=20,
|
|
||||||
width=20,
|
|
||||||
# bgcolor="#000000",
|
|
||||||
)
|
|
||||||
),
|
|
||||||
border=0,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def make_list_of_cells(inp) -> List[Td]:
|
def make_list_of_cells(inp) -> List[Td]:
|
||||||
# inp may be List,
|
# inp may be List,
|
||||||
if isinstance(inp, List):
|
if isinstance(inp, List):
|
||||||
@ -286,7 +256,6 @@ def gv_conductor_table(cable) -> Table:
|
|||||||
cells_above = [
|
cells_above = [
|
||||||
Td(" " + ", ".join(ins), align="left"),
|
Td(" " + ", ".join(ins), align="left"),
|
||||||
Td(" "), # increase cell spacing here
|
Td(" "), # increase cell spacing here
|
||||||
Td(bom_bubble(wire.id)) if cable.category == "bundle" else None,
|
|
||||||
Td(":".join([wi for wi in wireinfo if wi is not None and wi != ""])),
|
Td(":".join([wi for wi in wireinfo if wi is not None and wi != ""])),
|
||||||
Td(" "), # increase cell spacing here
|
Td(" "), # increase cell spacing here
|
||||||
Td(", ".join(outs) + " ", align="right"),
|
Td(", ".join(outs) + " ", align="right"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user