Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Priyesha
Created April 21, 2020 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Priyesha/f910ed0b9b20ae15694c3271faa247ce to your computer and use it in GitHub Desktop.
Save Priyesha/f910ed0b9b20ae15694c3271faa247ce to your computer and use it in GitHub Desktop.
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