Move link event handler after all other hooks have been added

This commit is contained in:
BoykoAlex
2019-11-04 14:55:13 -05:00
parent d2efa2251b
commit 963eac8c0a

View File

@@ -1028,8 +1028,6 @@ export class EditorComponent implements OnInit, OnDestroy {
}
handleLinkCreation(link: dia.Link) {
this.handleLinkEvent('add', link);
link.on('change:source', (l: dia.Link) => {
this.autosizePaper();
let newSourceId = l.get('source').id;
@@ -1074,6 +1072,8 @@ export class EditorComponent implements OnInit, OnDestroy {
if (this.readOnlyCanvas) {
link.attr('.link-tools/display', 'none');
}
this.handleLinkEvent('add', link);
}
initGraphListeners() {