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's not working when 'cytoscape.js-edgehandles' or 'cytoscape.js-edge-editing' are used at the same time with expand-collapse #116

Open
luis-pereira-altium opened this issue Oct 23, 2020 · 5 comments
Assignees

Comments

@luis-pereira-altium
Copy link

I'm trying to use cytoscape.js-expand-collapse together with cytoscape.js-edgehandles and cytoscape.js-edge-editing but for some reason it's not working.

When I click on expand/collapse icon nothing happens.

@luis-pereira-altium luis-pereira-altium changed the title It's not working when 'cytoscape.js-edgehandles' or 'cytoscape.js-edge-editing' is used at the same time with expand-collapse It's not working when 'cytoscape.js-edgehandles' or 'cytoscape.js-edge-editing' are used at the same time with expand-collapse Oct 23, 2020
@abulka
Copy link

abulka commented Jul 25, 2021

Similarly, using this extension with cytoscape.js-node-editing (for user node resizing) breaks the ability to resize nodes.

@hasanbalci
Copy link
Contributor

@abulka I created a demo that uses cytoscape.js-node-editing together with cytoscape.js-expand-collapse here. It seems working, what do you mean with "breaks the ability to resize nodes"?

@abulka
Copy link

abulka commented Jul 27, 2021

@hasanbalci Thanks for the (nice) demo which accurately shows the two plugins working OK together.

It turns out that the order of initialisation is important - cy.expandCollapse() must be called before cy.nodeEditing().
See a fork of your demo where nodeEditing is initialised first and the resizing of nodes is broken.

@hasanbalci
Copy link
Contributor

@abulka It's related with the zIndex options of the extensions. Both expand-collapse and node-editing extension add a new canvas to draw expand/collapse cue or resize grapples and z-index values of both canvases are 999 by default. When expand-collapse called after node-editing, its canvas prevents interaction with node-editing items because its canvas covers entire viewport. However, if you change zIndex option of node-editing to a higher value, e.g. 1000, then node-editing works again even though it's called before. See this.

@ugurdogrusoz
Copy link
Contributor

@hasanbalci for the extensions where we have these problems, can we remark in the readme the fact that when using the extension with certain other the order will matter for the reason you explain?

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

4 participants