Bump VLAN text sizes -- previous export was illegible in the PNG
Connector VLAN tags were 7.5px on a ~4000x9400px page -- effectively invisible unless zoomed in hard inside draw.io itself. Bumped: - connector labels: 7.5px -> 13px, bold, darker color - VLAN table: title 11->15px, header 9->12px, rows 9->12px (row/header height grown to match, table height computed from the same constants so nothing clips) Page height barely moved (4656 -> 4692px) since only the VLAN panel grew. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NM3nivbufxEWiKKmatEtEe
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.8 MiB |
@@ -132,8 +132,8 @@ def place_section(depth_map, yslot_map, y_offset):
|
|||||||
|
|
||||||
TITLE_H = 60
|
TITLE_H = 60
|
||||||
LEGEND_ROW_H = 34
|
LEGEND_ROW_H = 34
|
||||||
VLAN_ROW_H = 20
|
VLAN_ROW_H = 26
|
||||||
VLAN_HEADER_H = 24
|
VLAN_HEADER_H = 30
|
||||||
VLAN_TABLE_W = 900
|
VLAN_TABLE_W = 900
|
||||||
vlan_rows = max(1, len(vlans)) # the placeholder counts as one row
|
vlan_rows = max(1, len(vlans)) # the placeholder counts as one row
|
||||||
VLAN_TABLE_H = VLAN_HEADER_H + vlan_rows * VLAN_ROW_H + 16
|
VLAN_TABLE_H = VLAN_HEADER_H + vlan_rows * VLAN_ROW_H + 16
|
||||||
@@ -278,8 +278,8 @@ for idx, e in enumerate(edges):
|
|||||||
edge(f"e{idx}", f"n{a}", f"n{b}",
|
edge(f"e{idx}", f"n{a}", f"n{b}",
|
||||||
"edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#9AA6B8;strokeWidth=1.2;"
|
"edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#9AA6B8;strokeWidth=1.2;"
|
||||||
"startArrow=none;endArrow=none;"
|
"startArrow=none;endArrow=none;"
|
||||||
"jettySize=auto;orthogonalLoop=1;fontSize=7.5;fontColor=#7C8AA6;"
|
"jettySize=auto;orthogonalLoop=1;fontSize=13;fontStyle=1;fontColor=#3A4457;"
|
||||||
"labelBackgroundColor=#F7F8FBcc;align=center;verticalAlign=middle;",
|
"labelBackgroundColor=#F7F8FBee;align=center;verticalAlign=middle;",
|
||||||
value=label)
|
value=label)
|
||||||
|
|
||||||
# legend
|
# legend
|
||||||
@@ -317,14 +317,14 @@ add_cell(
|
|||||||
)
|
)
|
||||||
add_cell(
|
add_cell(
|
||||||
f'<mxCell id="vt-title" value="VLANs" style="text;html=1;align=left;verticalAlign=middle;'
|
f'<mxCell id="vt-title" value="VLANs" style="text;html=1;align=left;verticalAlign=middle;'
|
||||||
f'fontStyle=1;fontSize=11;fontColor=#33415C;" vertex="1" parent="1">'
|
f'fontStyle=1;fontSize=15;fontColor=#33415C;" vertex="1" parent="1">'
|
||||||
f'<mxGeometry x="{vt_x+10}" y="{vt_y}" width="200" height="{VLAN_HEADER_H}" as="geometry"/></mxCell>'
|
f'<mxGeometry x="{vt_x+10}" y="{vt_y}" width="200" height="{VLAN_HEADER_H}" as="geometry"/></mxCell>'
|
||||||
)
|
)
|
||||||
cx = vt_x + 90
|
cx = vt_x + 90
|
||||||
for label, w in vt_cols:
|
for label, w in vt_cols:
|
||||||
add_cell(
|
add_cell(
|
||||||
f'<mxCell id="vt-h-{label}" value="{escape(label)}" style="text;html=1;align=left;'
|
f'<mxCell id="vt-h-{label}" value="{escape(label)}" style="text;html=1;align=left;'
|
||||||
f'verticalAlign=middle;fontStyle=1;fontSize=9;fontColor=#7C8AA6;" vertex="1" parent="1">'
|
f'verticalAlign=middle;fontStyle=1;fontSize=12;fontColor=#7C8AA6;" vertex="1" parent="1">'
|
||||||
f'<mxGeometry x="{cx}" y="{vt_y}" width="{w}" height="{VLAN_HEADER_H}" as="geometry"/></mxCell>'
|
f'<mxGeometry x="{cx}" y="{vt_y}" width="{w}" height="{VLAN_HEADER_H}" as="geometry"/></mxCell>'
|
||||||
)
|
)
|
||||||
cx += w
|
cx += w
|
||||||
@@ -340,7 +340,7 @@ if not vlans:
|
|||||||
f'<mxCell id="vt-empty-txt" value="No VLANs defined in NetBox yet (ipam.VLAN) — this table '
|
f'<mxCell id="vt-empty-txt" value="No VLANs defined in NetBox yet (ipam.VLAN) — this table '
|
||||||
f'and each connector’s VLAN tag fill in automatically once VLANs and interface assignments '
|
f'and each connector’s VLAN tag fill in automatically once VLANs and interface assignments '
|
||||||
f'are added, next time this diagram is regenerated." style="text;html=1;align=left;'
|
f'are added, next time this diagram is regenerated." style="text;html=1;align=left;'
|
||||||
f'verticalAlign=middle;fontSize=9;fontColor=#7C8AA6;fontStyle=2;whiteSpace=wrap;" '
|
f'verticalAlign=middle;fontSize=12;fontColor=#7C8AA6;fontStyle=2;whiteSpace=wrap;" '
|
||||||
f'vertex="1" parent="1"><mxGeometry x="{vt_x+90}" y="{row_y}" width="{VLAN_TABLE_W-100}" '
|
f'vertex="1" parent="1"><mxGeometry x="{vt_x+90}" y="{row_y}" width="{VLAN_TABLE_W-100}" '
|
||||||
f'height="{VLAN_ROW_H}" as="geometry"/></mxCell>'
|
f'height="{VLAN_ROW_H}" as="geometry"/></mxCell>'
|
||||||
)
|
)
|
||||||
@@ -359,7 +359,7 @@ else:
|
|||||||
for (label, w), val in zip(vt_cols, row_vals):
|
for (label, w), val in zip(vt_cols, row_vals):
|
||||||
add_cell(
|
add_cell(
|
||||||
f'<mxCell id="vt-{v["vid"]}-{label}" value="{escape(val)}" style="text;html=1;align=left;'
|
f'<mxCell id="vt-{v["vid"]}-{label}" value="{escape(val)}" style="text;html=1;align=left;'
|
||||||
f'verticalAlign=middle;fontSize=9;fontColor=#3A4457;" vertex="1" parent="1">'
|
f'verticalAlign=middle;fontSize=12;fontColor=#3A4457;" vertex="1" parent="1">'
|
||||||
f'<mxGeometry x="{cx}" y="{row_y}" width="{w}" height="{VLAN_ROW_H}" as="geometry"/></mxCell>'
|
f'<mxGeometry x="{cx}" y="{row_y}" width="{w}" height="{VLAN_ROW_H}" as="geometry"/></mxCell>'
|
||||||
)
|
)
|
||||||
cx += w
|
cx += w
|
||||||
|
|||||||
Reference in New Issue
Block a user