Skip to content

Commit 58d16e1

Browse files
quic-boyucclaude
andcommitted
fx_viewer: scale minimap node highlight sizes with minimapScale
Fixes highlighted nodes (path, selected edge, search candidates, target) to use scale-relative sizes instead of fixed pixel values, so highlights remain visible at all zoom levels. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3c71a4c commit 58d16e1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

backends/qualcomm/utils/fx_viewer/templates/minimap_renderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,20 @@ class MinimapRenderer {
256256
(edge) => nodeSet.has(edge.v) && nodeSet.has(edge.w)
257257
);
258258
drawEdges(edges, color, 2 / this.minimapScale);
259-
drawNodes(Array.from(nodeSet), 0, color);
259+
drawNodes(Array.from(nodeSet), 2/this.minimapScale, color);
260260
});
261261
}
262262

263263
if (state.selectedEdge) {
264-
drawNodes([state.selectedEdge.v, state.selectedEdge.w], 0, theme.nodeSelected);
264+
drawNodes([state.selectedEdge.v, state.selectedEdge.w], 2/this.minimapScale, theme.nodeSelected);
265265
}
266266

267267
if (state.searchCandidates.length > 0) {
268-
drawNodes(state.searchCandidates.map(c => c.node.id), 0, theme.nodeSelected);
268+
drawNodes(state.searchCandidates.map(c => c.node.id), 2/this.minimapScale, theme.nodeSelected);
269269
}
270270

271271
if (target) {
272-
drawNodes([target], 1 / this.minimapScale, theme.nodeSelected);
272+
drawNodes([target], 3/ this.minimapScale, theme.nodeSelected);
273273
}
274274

275275
this.ctx.restore();

0 commit comments

Comments
 (0)