Skip to content

Fix edge and node labels disappearing at middle zoom levels#1630

Open
tmchow wants to merge 1 commit intoaws:mainfrom
tmchow:osc/1600-fix-edge-label-zoom
Open

Fix edge and node labels disappearing at middle zoom levels#1630
tmchow wants to merge 1 commit intoaws:mainfrom
tmchow:osc/1600-fix-edge-label-zoom

Conversation

@tmchow
Copy link
Copy Markdown

@tmchow tmchow commented Apr 2, 2026

Summary

Set minZoomedFontSize to 0 in both defaultEdgeStyle.ts and defaultNodeStyle.ts. The previous value of 6 interacted with fontSize: 7 to create a narrow band at intermediate zoom levels where Cytoscape.js would hide labels unexpectedly.

Changes

  • packages/graph-explorer/src/components/Graph/styles/defaultEdgeStyle.ts -- minZoomedFontSize: 6 to 0
  • packages/graph-explorer/src/components/Graph/styles/defaultNodeStyle.ts -- minZoomedFontSize: 6 to 0

Setting minZoomedFontSize to 0 disables the zoom threshold entirely, so labels stay visible at all zoom levels until they're naturally too small to render. This matches the expected behavior described in the issue.

Testing

Verified the change is scoped to only the two style files referenced in the issue. The Cytoscape.js min-zoomed-font-size property at 0 means "always show the label" per the Cytoscape docs.

This contribution was developed with AI assistance (Codex).

Fixes #1600

Set minZoomedFontSize to 0 in both defaultEdgeStyle.ts and
defaultNodeStyle.ts. The previous value of 6 interacted with fontSize 7
to create a narrow band at intermediate zoom levels where labels would
vanish unexpectedly.

Fixes aws#1600
@kmcginnes
Copy link
Copy Markdown
Collaborator

Thanks @tmchow for the submission. I'll take a look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edge labels disappear at middle zoom levels

2 participants