Open doudou673 opened 3 years ago
You can use cy
prop to access the Cytoscape API directly.
For example:
import cytoscape from "cytoscape";
import CytoscapeComponent from "react-cytoscapejs";
import sbgnStylesheet from "cytoscape-sbgn-stylesheet";
export default function App() {
const cyStylesheet = sbgnStylesheet(cytoscape);
return (
<CytoscapeComponent
elements={CytoscapeComponent.normalizeElements(elements)}
cy={(cy) => cy.style(cyStylesheet)}
/>
);
}
I want to use sbgn-stylesheet in my react app, but it doesn't work![image](https://user-images.githubusercontent.com/54931067/130923798-4a80b7d7-7894-4ec0-ab69-3cc0fc78fc17.png)