fix:修改选中节点 边也会被选中的问题 ,修改 resize后节点上的图标 大小不变的问题
This commit is contained in:
@@ -228,6 +228,7 @@
|
|||||||
lineId:'',
|
lineId:'',
|
||||||
id:'',
|
id:'',
|
||||||
},
|
},
|
||||||
|
hoverEdge:false,
|
||||||
isLineAdd:true,
|
isLineAdd:true,
|
||||||
isNodeAdd:true,
|
isNodeAdd:true,
|
||||||
nodeData:{
|
nodeData:{
|
||||||
@@ -367,10 +368,11 @@
|
|||||||
arrowStrikethrough:false,
|
arrowStrikethrough:false,
|
||||||
chosen:{
|
chosen:{
|
||||||
edge:(values, id, selected, hovering)=>{
|
edge:(values, id, selected, hovering)=>{
|
||||||
values.middleArrow=true;
|
if(this_.hoverEdge){
|
||||||
values.middleArrowScale=1;
|
values.middleArrow=true;
|
||||||
values.middleArrowType='circle';
|
values.middleArrowScale=1;
|
||||||
console.log(id, selected, hovering);
|
values.middleArrowType='circle';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -734,6 +736,14 @@
|
|||||||
// this_.addLineShow=true;
|
// 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.network.on("dragStart", function (params) {//节点移动开始
|
||||||
this_.NodeArrShow=false;
|
this_.NodeArrShow=false;
|
||||||
let selId=params.nodes[0];
|
let selId=params.nodes[0];
|
||||||
@@ -802,8 +812,11 @@
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
});
|
});
|
||||||
this.network.on("resize", function () {//检测resize
|
this.network.on("resize", function (params,a) {//检测resize
|
||||||
|
|
||||||
setTimeout(()=>{
|
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_.modelTopUpdate();
|
||||||
this_.selNodeArrUpdate();
|
this_.selNodeArrUpdate();
|
||||||
if(this_.networkPopShow){
|
if(this_.networkPopShow){
|
||||||
|
|||||||
Reference in New Issue
Block a user