したがって、ユーザーがangularjsを使用して作成した2つの要素を曲線で接続しようとしていますが、このエラーが発生しています:
Uncaught TypeError: 未定義のプロパティ 'parentNode' を読み取れません - AngularJS と jsPlumb 接続
私のサービスの機能
//this function adds a new object to the array of objects in sourceObject
function addNewDiv(sourceObject) {
console.log('added a new subquestion');
sourceObject.children.push({id: 'q-'+counter, anchor: 'a-'+counter});
counter++;
//return the newly created object so we can link the parent and child.
var newObject = sourceObject.children[sourceObject.children.length-1];
jsPlumb.connect({source: sourceObject.anchor, target: newObject.anchor});
}
基本的に、sourceObject を新しく作成した子に接続していますが、これはサービスの 1 つで発生しています。要素の動的な作成で何かが起こっていると考えていますが、完全にはわかりません.