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

It does not work at all to set the shape of parent nodes . #1891

Closed
4 tasks done
qtttttttttting opened this issue Jul 10, 2017 · 3 comments
Closed
4 tasks done

It does not work at all to set the shape of parent nodes . #1891

qtttttttttting opened this issue Jul 10, 2017 · 3 comments

Comments

@qtttttttttting
Copy link

qtttttttttting commented Jul 10, 2017

I'm submitting a:

  • Bug report

It does not work at all to set the shape of parent nodes .

Environment info

  • Browser and version: chrome 59.0.3071.115
  • Node version (if running headless): v6.10.2
  • Cytoscape.js version: v3.1.2

Current behavior

The code goes in the way:
{
selector: ':parent',
style: {
'shape':'ellipse',
'background-image': TMP,
'background-color':'#f6f6f5',
'border-width': 0,
'content': ''
}
}
I want to change the shape of all the parent nodes, but whatever I set the shape property ,it remains rectangle .

Desired behavior

I want the shape of all the parent nodes to be ellipse.

Minimum steps to reproduce


Eager for answers! Thank you ~

@maxkfranz
Copy link
Member

You can only use rectangle shapes, because a parent's dimensions are defined by the bounding box of the children. rectangle, roundrectangle, and cutrectangle work.

@qtttttttttting
Copy link
Author

Do you have any suggestions if I have to satisfy this need?

@maxkfranz
Copy link
Member

Cytoscape.js supports only rect-like shapes for compounds. Either use regular nodes if you want a true ellipse, or use a roundrectangle on a parent.

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

No branches or pull requests

2 participants