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

Error: Can not register expandCollapse for core since expandCollapse already exists in the prototype and can not be overridden. #117

Open
celine3d opened this issue Oct 28, 2020 · 2 comments

Comments

@celine3d
Copy link

I am using cytoscape.js in react and cytoscape.js-expand-collapse. I register this extension at the very begining of my file as shown in docs: https://github.com/iVis-at-Bilkent/cytoscape.js-expand-collapse: by doing expandCollapse( cytoscape ); and it works only on first render. When I come back to my cytoscape component I receive following error: Can not register expandCollapse for core since expandCollapse already exists in the prototype and can not be overridden.

@mdub
Copy link

mdub commented Nov 15, 2020

I'm having the same issue, but this work-around seems to be working for me:

if (typeof Cytoscape('core', 'expandCollapse') == 'undefined') {
  Cytoscape.use(CytoscapeUndoRedo);
  Cytoscape.use(CytoscapeExpandCollapse);
}

@sashokbg
Copy link

I am having the same issue but I cannot figure out how to apply the fix. In my case It fails on first load. Any help is appreciated.

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

3 participants