jtopo默认的选中框是蓝色边框,与topo节点颜色很相似,看不清楚,所以我把topo选中的颜色改成大红色了
,在addNode函数中加下面一段代码就好了(百度上看到的,很有用,收藏起来)
node.paintSelected = function(a){
0 != this.showSelected &&
(a.save(),
a.beginPath(),
a.fillStyle = "#FF4500",//选中框颜色
a.fillRect(-this.width/2,-this.height/2,this.width,this.height),//选中框宽度调节
a.stroke(),
a.closePath(),
a. restore()
)};