Diagram doesn't seem
See original GitHub issueHi,
My codes are as follows but nothing doesn’t seem.
import React from 'react';
import {
DiagramEngine,
DiagramModel,
DiagramProps,
DefaultNodeModel,
LinkModel,
DiagramWidget
} from "storm-react-diagrams";
require("storm-react-diagrams/dist/style.min.css");
function App() {
const engine = new DiagramEngine();
engine.installDefaultFactories();
const model = new DiagramModel();
var node1 = new DefaultNodeModel("Node 1", "rgb(0,192,255)");
let port1 = node1.addOutPort("Out");
node1.setPosition(100, 100);
var node2 = new DefaultNodeModel("Node 2", "rgb(192,255,0)");
let port2 = node2.addInPort("In");
node2.setPosition(400, 100);
let link1 = port1.link(port2);
link1.setColor('black');
model.addAll(node1, node2, link1);
var node3 = new DefaultNodeModel("Node 3", "rgb(192,255,0)");
node3.addInPort("In");
node3.addOutPort("out");
model.addAll(node3);
engine.setDiagramModel(model);
return <DiagramWidget diagramEngine={engine}/>;
}
export default App;
Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Chart options don't appear when clicking on chart (Excel 2016)
I have Excel 2016 and by clicking on a chart, the plus sign on the top right corner doesn't appear.
Read more >TINA/Spice: Remember diagram settings does not seem to work
Under Analysis Options, I have enabled "Remember diagram settings". Even after running a plot, setting settings up, closing the plot, re-running ...
Read more >networkD3 Sankey diagram doesn't appear in the viewer, no ...
The code runs without error and then I get a blank viewer. The Source and Target nodes are zero indexed, and they are...
Read more >Need help with a circuit diagram where the motor does not ...
Need help with a circuit diagram where the motor does not seem to have any connection to ground. Error with diagram? Or am...
Read more >PlantUML Plugin - doesn't seem to allow Diagrams s...
But now unable to save diagrams. Is this a known bug? ... PlantUML Plugin - doesn't seem to allow Diagrams saving as of...
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
So setting this in my app.css worked.
.srd-diagram { height: 80vh; background-color: aliceblue; width: 90%; }
You have to set height, width, backgroundColor of the parent dom element. see this https://stackoverflow.com/questions/49513323/react-diagrams-invisible
Verify if the elements are present or not in the react developer panel.