//是否启用功能
MethodsProperties: [
{ name:”SingleClick”, state:true }, //单击
{ name:”DoubleClick”, state:true }, //双击
{ name:”NodeDrag”, state:true }, //节点拖动
{ name:”LineDrag”, sate:true }, //连线拖动
{ name:”FollowDrag”, sate:false }, //节点子随父拖动而动
],
//渐变色配置,节点颜色配置
//节点颜色
NodeColor: [
{
name:”知识集”,
color1:”#FFA16E”,
color2:”#F48244”,
state:”color”,
},]
//连线颜色配置
LinkColor: [
{ name:”具有”, color:”#4A5150”, id:”arrow” },]
比较复杂的就是环形菜单配置
//环形菜单配置
//datadefo :是配置环形菜单事件细节
//label:环形菜单名称,
//r:环形菜单距离
//
RingFunction: [
{
name:”addNodeButtonsOne”,
data:[1,1,1,1],
datadefo: [
{ name:”add”, default: (d,this,_d3) => {
letoutbuttongroup_id=”.out_buttongroup“+d.id;
this.svg.selectAll(“.buttongroup”).classed(“circle_none”, true);
__this.svg.selectAll(outbuttongroup_id).classed(“circle_none”, false);
__this.RingFunction.filter((res) => {
if (res.name ==”addNodeButtonsTWO”) {
for (leti=res.label.length-1; i>=0; i—) {
d3.selectAll(“.”+res.id+i).style(“display”,”block”)
}
}
});
}},
{ name:”delete”, default: (d,this,_d3) => {console.log(22222);} },
{ name:”MORE”, default: (d,this,_d3) => {console.log(333333);} },
{ name:”edtor”, default: (d,_this,d3) => {console.log(44444);} },
],
label:[ {name:”新建”,state:”text”},{name:”删除”,state:”text”},{name:”克隆”,state:”text”},{name:”编辑”,state:”text”}],
id:”action_”,
r:25,
default:function () {},
},】