Javascript jsplumb 1.4.1通过uuid或对象示例删除端点
我有一些div元素,每个元素有两个端点(一个在左侧,一个在右侧)。 现在我要删除每个右侧端点。 每个端点都有自己独特的uuid。 我得到了右侧端点的每个uuid的数组->遍历它们并删除它们中的每一个,但这不起作用 有人能给我一个通过uuid或对象删除端点的工作示例吗? 在我的情况下,这两者都不起作用。每次我都收到这个错误信息: TypeError:o未定义 jquery.jsplump-1.4.1-all.js 第681行 提前谢谢Javascript jsplumb 1.4.1通过uuid或对象示例删除端点,javascript,jquery,jsplumb,Javascript,Jquery,Jsplumb,我有一些div元素,每个元素有两个端点(一个在左侧,一个在右侧)。 现在我要删除每个右侧端点。 每个端点都有自己独特的uuid。 我得到了右侧端点的每个uuid的数组->遍历它们并删除它们中的每一个,但这不起作用 有人能给我一个通过uuid或对象删除端点的工作示例吗? 在我的情况下,这两者都不起作用。每次我都收到这个错误信息: TypeError:o未定义 jquery.jsplump-1.4.1-all.js 第681行 提前谢谢 var-that=$('div')//获取所有具有端点的DIV
var-that=$('div')//获取所有具有端点的DIV标记
var that=$('div'); //get all of your DIV tags having endpoints
for (var i=0;i<that.length;i++) {
var endpoints = jsPlumb.getEndpoints($(that[i])); //get all endpoints of that DIV
for (var m=0;m<endpoints.length;m++) {
if(endpoints[m].anchor.type=="Right") //Endpoint on right side
jsPlumb.deleteEndpoint(endpoints[m]); //remove endpoint
}
}
对于(var i=0;i
var that=$('div'); //get all of your DIV tags having endpoints
for (var i=0;i<that.length;i++) {
var endpoints = jsPlumb.getEndpoints($(that[i])); //get all endpoints of that DIV
for (var m=0;m<endpoints.length;m++) {
if(endpoints[m].anchor.type=="Right") //Endpoint on right side
jsPlumb.deleteEndpoint(endpoints[m]); //remove endpoint
}
}