Example of wrapping ReactFlow doesn't work as intended(nodes can't be dragged)
Path: /docs/wrapping-react/example
Created nodes can't be dragged, despite specifying so
Hey @Alek99
Looks like onNodeChange is not implemented , Idea is to add a event handler onNodeChange and change the position of the dragged node to the new position.
Is there a way to wrap litegraph.js?
@xiong-zhitong I guess you can use Wrapping , to make a custom wrapper of your own and then use it to wrap litegraph.js
@xiong-zhitong I guess you can use Wrapping , to make a custom wrapper of your own and then use it to wrap litegraph.js
Thanks for your reply! It seems like the LGraph class is very complex. Don't know how to wrap the functions like "add", "start" ...
<html>
<head>
<link rel="stylesheet" type="text/css" href="litegraph.css">
<script type="text/javascript" src="litegraph.js"></script>
</head>
<body style='width:100%; height:100%'>
<canvas id='mycanvas' width='1024' height='720' style='border: 1px solid'></canvas>
<script>
var graph = new LGraph();
var canvas = new LGraphCanvas("#mycanvas", graph);
var node_const = LiteGraph.createNode("basic/const");
node_const.pos = [200,200];
graph.add(node_const);
node_const.setValue(4.5);
var node_watch = LiteGraph.createNode("basic/watch");
node_watch.pos = [700,200];
graph.add(node_watch);
node_const.connect(0, node_watch, 0 );
graph.start()
</script>
</body>
</html>
Can I try to attempt to create a wrapper and then wrap litegraph to reflex or try to implement onnodechange since it is a good first issue? I have tried to get assigned to 4262 issue but in case its already finished may I try to attempt this?
Hi, I am working on a team project in school and wanted to take a shot at this issue with my team, can I be allowed permission for this issue?
Hi, I noticed it was fixed some time ago, although it's very laggy.
@seb613 Thanks!