Add particle animation for connection activity
This commit is contained in:
@@ -98,21 +98,21 @@ export class TpFlowNodes extends zoom(panning(connections(LitElement))) {
|
||||
this.connections = [];
|
||||
|
||||
// Create all nodes first
|
||||
const nodes = flowData.nodes.map(nodeData => {
|
||||
const nodes = flowData.nodes?.map(nodeData => {
|
||||
const node = this.createNode(nodeData.type);
|
||||
node.importData(nodeData);
|
||||
return node;
|
||||
});
|
||||
|
||||
// Set nodes and wait for render
|
||||
this.nodes = nodes;
|
||||
this.nodes = nodes || [];
|
||||
await this.updateComplete;
|
||||
|
||||
// Wait for all nodes to be ready
|
||||
await Promise.all(this.nodes.map(node => node.updateComplete));
|
||||
|
||||
// Only after nodes are ready, restore connections
|
||||
this.connections = flowData.connections;
|
||||
this.connections = flowData.connections || [];
|
||||
|
||||
// Restore canvas state
|
||||
if (flowData.canvas) {
|
||||
|
||||
Reference in New Issue
Block a user