hookehuyr

test 点击显示四边锚点的操作

......@@ -64,6 +64,11 @@ export function clickSelect(G6) {
}
graph.setAutoPaint(autoPaint);
graph.paint();
// TEST: 点击时隐藏所有锚点,显示当前锚点
// graph.getNodes().forEach(node => {
// node.hideAnchor(graph)
// });
// item.showAnchor(graph)
},
onCanvasClick() {
......
......@@ -31,9 +31,11 @@ export function hoverAnchorActive(G6) {
onLeaveNode(e) {
try {
const item = e.item;
item.hideAnchor(this.graph)
// TEST: 注释掉鼠标离开时隐藏当前锚点,可以配合单击显示锚点使用。
item.hideAnchor(this.graph);
} catch (e) {
console.error(e);
}
},
})
}
\ No newline at end of file
}
......