Antv X6 實(shí)現(xiàn)了流程圖后,在需要確認(rèn)當(dāng)前點(diǎn)擊對象時,可通過以下方法設(shè)置節(jié)點(diǎn)、邊的高亮
/**
* 點(diǎn)擊節(jié)點(diǎn)是,對選擇的節(jié)點(diǎn)進(jìn)行高亮處理
* 同時,重置原先高亮的節(jié)點(diǎn)
* @param {已經(jīng)選擇的節(jié)點(diǎn)} $ele
*/
HighLight function($ele) {
if (this.$Node !== null) {
this.$Node.getAttrs().body.fill = 'rgba(95, 149, 255, 0.40)'
this.$Node.setAttrs(this.$Node.getAttrs().body.fill)
}
$ele.getAttrs().body.fill = '#DD5044'
$ele.setAttrs($ele.getAttrs().body.fill)
}