Skip to content

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

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

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.

@kmcginnes
Copy link
Copy Markdown
Collaborator

@tmchow I'm closing this since I couldn't reproduce the original issue, and I created it. Maybe it was a total fluke occurrence.

Let me know if you saw the behavior when you fixed it. And try the latest code on main to see if the issue still exists. If it does, we can re-open this. But i don't want to merge the change unless it is necessary.

@kmcginnes kmcginnes closed this Apr 13, 2026
@tmchow
Copy link
Copy Markdown
Author

tmchow commented Apr 13, 2026

@tmchow I'm closing this since I couldn't reproduce the original issue, and I created it. Maybe it was a total fluke occurrence.

Let me know if you saw the behavior when you fixed it. And try the latest code on main to see if the issue still exists. If it does, we can re-open this. But i don't want to merge the change unless it is necessary.

Np!

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