Fix edge and node labels disappearing at middle zoom levels#1630
Open
Fix edge and node labels disappearing at middle zoom levels#1630
Conversation
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
Collaborator
|
Thanks @tmchow for the submission. I'll take a look soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Set
minZoomedFontSizeto0in bothdefaultEdgeStyle.tsanddefaultNodeStyle.ts. The previous value of6interacted withfontSize: 7to 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: 6to0packages/graph-explorer/src/components/Graph/styles/defaultNodeStyle.ts--minZoomedFontSize: 6to0Setting
minZoomedFontSizeto0disables 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-sizeproperty at0means "always show the label" per the Cytoscape docs.This contribution was developed with AI assistance (Codex).
Fixes #1600