Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ngAfterViewInit() {
this.nodeService.jsPlumbInstance.bind('connection', info => {
this.simpleModalService.addModal(DialogComponent, {
title: 'Dialog',
questions: { name: '', type: ''}})
.subscribe((result) => {
const targetNode = this.nodes.find(node => node.id === info.targetId);
if (targetNode) {
targetNode.name = result.name;
targetNode.type = result.type;
if (targetNode.type === 'end') {
this.nodeService.jsPlumbInstance.deleteEndpoint(info.targetId + 'right');
}
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment