fix:修改选中节点 边也会被选中的问题 ,修改 resize后节点上的图标 大小不变的问题

This commit is contained in:
zhangyu
2020-09-07 11:34:13 +08:00
parent 7fa6a0aa81
commit 55b9f2e033

View File

@@ -228,6 +228,7 @@
lineId:'',
id:'',
},
hoverEdge:false,
isLineAdd:true,
isNodeAdd:true,
nodeData:{
@@ -367,10 +368,11 @@
arrowStrikethrough:false,
chosen:{
edge:(values, id, selected, hovering)=>{
values.middleArrow=true;
values.middleArrowScale=1;
values.middleArrowType='circle';
console.log(id, selected, hovering);
if(this_.hoverEdge){
values.middleArrow=true;
values.middleArrowScale=1;
values.middleArrowType='circle';
}
},
},
},
@@ -734,6 +736,14 @@
// this_.addLineShow=true;
});
this.network.on("hoverEdge", function () { // 悬停边
this_.hoverEdge=true;
});
this.network.on("blurEdge", function () { // 边失去焦点
this_.hoverEdge=false;
});
this.network.on("dragStart", function (params) {//节点移动开始
this_.NodeArrShow=false;
let selId=params.nodes[0];
@@ -802,8 +812,11 @@
}
return false
});
this.network.on("resize", function () {//检测resize
this.network.on("resize", function (params,a) {//检测resize
setTimeout(()=>{
this_.zoom=this_.network.canvasToDOM({x:0,y:1}).y-this_.network.canvasToDOM({x:0,y:0}).y;
console.log(this_.zoom);
this_.modelTopUpdate();
this_.selNodeArrUpdate();
if(this_.networkPopShow){