diff --git a/README.md b/README.md index b305afd..7a60ea8 100644 --- a/README.md +++ b/README.md @@ -137,14 +137,28 @@ Cytoscape.use(COSEBilkent); class MyApp extends React.Component { render() { const elements = [ - { data: { id: 'one', label: 'Node 1' }, position: { x: 0, y: 0 } }, - { data: { id: 'two', label: 'Node 2' }, position: { x: 100, y: 0 } }, - { data: { source: 'one', target: 'two', label: 'Edge from Node1 to Node2' } } + { data: { id: "one", label: "Node 1" }, position: { x: 0, y: 0 } }, + { data: { id: "two", label: "Node 2" }, position: { x: 100, y: 0 } }, + { + data: { + source: "one", + target: "two", + label: "Edge from Node1 to Node2", + }, + }, ]; - const layout = { name: 'cose-bilkent' }; - - return ; + const layout = { name: "cose-bilkent" }; + + return ( + { + cy.layout(layout).run(); + }} + elements={elements} + layout={layout} + /> + ); } } ```