Closed Tirguy closed 10 months ago
PS: I forgot, but is it also possible to display the name of a node's input or output?
Minal example template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/jerosoler/Drawflow/dist/drawflow.min.css"
/>
<script src="https://cdn.jsdelivr.net/gh/jerosoler/Drawflow/dist/drawflow.min.js"></script>
<style>
#drawflow {
position: relative;
width: 100%;
height: 800px;
border: 1px solid red;
}
</style>
</head>
<body>
<div>
<div id="drawflow"></div>
</div>
<script>
var id = document.getElementById("drawflow");
const editor = new Drawflow(id);
editor.start();
editor.addNode('test1', 2, 2, 50, 25, 'test1', {}, '<div>Hola</div>');
</script>
</body>
</html>
View this issue for display name of node input / outputs
Thank's a lot... too speed ! :-D It works ;-) I continue to test... and come back if another problem will appear ! OK, I will look for the name of node also in your link... Thank's again...
Thierry
Hello,
Sorry to ask my question here, but I don't know where else to ask it: I also have to say that I'm a javascript newbie ;-) !
I'm looking to use the Drawflow library in a basic way: first, I just want to display 1 box (node) offering 2 inputs and 2 outputs...
My plan is to display a lot more later on, but that's another subject ;-)
My big problem is that I'm having trouble getting started with this library, despite the examples. Note that I don't use the Vue.js library and create my pages using home-made HTML and CSS code.
To give an example of what I've done, here's the code for an example page I've tried to write but which doesn't work :
The name of my page is "test.php": when I execute it, nothing appears on the page, not a single box or text... Worse, when I look at the Javascript debugger, it tells me "Uncaught ReferenceError: Drawflow is not defined". I'm on Firefox 102...
Is it possible for someone to give me a simple page that works? Or explain to me what's wrong with my page... I've read and reread the documentation several times, tried to find examples on the Internet (Goggle could have been my friend... but not in this case :-( ).
Thank you very much, Sincerely, Thierry