Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotated label is misplaced when zoomed out #3271

Open
7 tasks
richdrich opened this issue Aug 28, 2024 · 0 comments
Open
7 tasks

Rotated label is misplaced when zoomed out #3271

richdrich opened this issue Aug 28, 2024 · 0 comments
Labels
bug A bug in the code of Cytoscape.js

Comments

@richdrich
Copy link

Environment info

  • Cytoscape.js version : 3.30.2
  • Browser/Node.js & version : Chrome/128.0.6613.85, Firefox/127.0, Edge/128.0.2739.42

Current (buggy) behaviour

What does the bug do?

When a label has a non-zero rotation and text-valign=top, text-halign=center , then when zoomed out (small label size) the label floats above the correct position. This seems to have to do with the cache?

Desired behaviour

What do you expect Cytoscape.js to do instead?

Label should be consistently aligned with the node as specified by text-valign and text-halign at any rotation or scale.

Minimum steps to reproduce

What do you need to do to reproduce the issue?

See: https://output.jsbin.com/tucakeruji/1

Or attached index.html

In both cases, when zoomed out, we see the issue, when zoomed in, the label is aligned correcty.

image

image

For reviewers

Reviewers should ensure that the following tasks are carried out for incorporated issues:

  • Ensure that the reporter has included a reproducible demo. They can easily fork this JSBin demo: http://jsbin.com/fiqugiq
  • The issue has been associated with a corresponding milestone.
  • The commits have been incorporated into the corresponding branches. Bug-fix patches go on
    • master,
    • unstable, and
    • the previous feature release branch (e.g. 1.1.x if the current release is 1.2).
  • The issue has been labelled as a bug, if necessary.

index.zip

@richdrich richdrich added the bug A bug in the code of Cytoscape.js label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in the code of Cytoscape.js
Projects
None yet
Development

No branches or pull requests

1 participant