问题描述
文档不清楚如何删除边。我试过了
this.cyNetwork.remove("edge[id == #" + id +"]");
this.cyNetwork.remove("edge[id == " + id +"]");
this.cyNetwork.remove(id);
所有这些只是说明选择器无效。
解决方法
尝试 this.cyNetwork.$id(id).remove();
检查文档以通过 id https://js.cytoscape.org/#cy.getElementById 删除元素 https://js.cytoscape.org/#eles.remove