rsdeps

Cargo.lock visualizer (mirror)
Log | Files | Refs | README | LICENSE

commit 88bdabe314c95eba30bf74c8647cd52c28d0c24c
parent 0f920d3883ed1b8420df0916e9e37fead20c999a
Author: Andy Khramtsov <>
Date:   Fri, 29 May 2026 23:39:51 +0300

refactor: use classes

Diffstat:
Msrc/deps/pages/home.py | 31+++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/src/deps/pages/home.py b/src/deps/pages/home.py @@ -338,8 +338,8 @@ def draw_graph_figure( def build_line_scatter(edge: EdgeFigData, width: float, color: str) -> go.Scatter: return go.Scatter(x=edge.x, y=edge.y, line=dict(width=width, color=color), hoverinfo="skip", mode="lines") - edge_trace = build_line_scatter(edges, width=1.0, color=colors.line_faint if selected_node else colors.line) - edge_trace_highlight = build_line_scatter(edges_highlight, width=1.5, color=colors.line_highlight) + edge_scatter = build_line_scatter(edges, width=1.0, color=colors.line_faint if selected_node else colors.line) + edge_scatter_highlight = build_line_scatter(edges_highlight, width=1.5, color=colors.line_highlight) nodes = NodeFigData( x=[], @@ -396,13 +396,13 @@ def draw_graph_figure( text=node.label, hovertext=node.hover_text, customdata=node.custom_data, - marker=dict( + marker=go.Marker( showscale=False, color=node.color, size=16, - line=dict(width=1, color=node.outline_color), + line=go.scatter.marker.Line(width=1, color=node.outline_color), ), - textfont=dict( + textfont=go.scatter.Textfont( size=10, color=node.label_color, shadow=( @@ -417,22 +417,25 @@ def draw_graph_figure( hoverinfo="text", ) - node_trace = build_node_scatter(nodes) - node_trace_highlight = build_node_scatter(nodes_highlight) + node_scatter = build_node_scatter(nodes) + node_scatter_highlight = build_node_scatter(nodes_highlight) fig = go.Figure( data=[ - edge_trace, - node_trace, - edge_trace_highlight, - node_trace_highlight, + edge_scatter, + node_scatter, + edge_scatter_highlight, + node_scatter_highlight, ], layout=go.Layout( showlegend=False, hovermode="closest", - margin=dict(b=20, l=20, r=20, t=20), - xaxis=dict(showgrid=False, zeroline=False, showticklabels=False), - yaxis=dict(showgrid=False, zeroline=False, showticklabels=False), + hoverlabel=go.layout.Hoverlabel( + bgcolor=colors.background, + ), + margin=go.layout.Margin(b=20, l=20, r=20, t=20), + xaxis=go.layout.XAxis(showgrid=False, zeroline=False, showticklabels=False), + yaxis=go.layout.YAxis(showgrid=False, zeroline=False, showticklabels=False), plot_bgcolor=colors.background, ), )