Can't get Storm react diagrams to work
See original GitHub issueHi there,
My link is not displayed and I don’t know why 😕
Here is my code :
this.engine = new DiagramEngine();
this.engine.registerNodeFactory(new DefaultNodeFactory());
this.engine.registerLinkFactory(new DefaultLinkFactory());
const model = new DiagramModel();
const node1 = new DefaultNodeModel("Node 1", "rgb(0,192,255)");
const port1 = node1.addPort(new DefaultPortModel(false, "out-1", "Out"));
node1.x = 100;
node1.y = 100;
const node2 = new DefaultNodeModel("Node 2", "rgb(192,255,0)");
const port2 = node2.addPort(new DefaultPortModel(true, "in-1", "IN"));
node2.x = 400;
node2.y = 100;
const link1 = new LinkModel();
link1.setSourcePort(port1);
link1.setTargetPort(port2);
model.addNode(node1);
model.addNode(node2);
model.addLink(link1);
this.engine.setDiagramModel(model);
render() {
return ( <DiagramWidget
css={css`
background-color: #f5f5f5;
height: 100vh;
`}
diagramEngine={engine}
/>)
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
React-diagrams - cannot get simple demo to work #519 - GitHub
If that doesnt work, press CTRL + SHIFT + C and move your mouse around your application until you find any DOM element...
Read more >projectstorm/react-diagrams - Gitter
Hi everybody, My diagram project works perfectly with drag and drop zoom etc. But if I insert other react components outside the diagram...
Read more >@projectstorm/react-diagrams-routing - npm
This package adds dagre integration for laying out nodes and links. Latest version: 6.7.4, last published: 6 months ago.
Read more >projectstorm/react-diagrams examples - CodeSandbox
Learn how to use @projectstorm/react-diagrams by viewing and forking example apps that make use of @projectstorm/react-diagrams on CodeSandbox.
Read more >Getting Started - React Diagrams - GitBook
When you run this in your project directory, this will install the library into ./node_modules/@projectstorm/react-diagrams . You will then find a dist ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reverting to react@16.7.0 react-dom@16.7.0 and react-scripts@2.1.3 fixed the issue for me
I have similar (possibly the same) issue. I see links displayed, but out of place (see screenshot). Although links are OK when created with mouse. Issue was not observed with previous installation I have from few weeks ago.