docs: set node front when embeded (#694)

This commit is contained in:
vector
2021-02-25 11:22:19 +08:00
committed by GitHub
parent 2fd50e0eb5
commit 42467df69d

View File

@ -33,6 +33,7 @@ export default class FlowGraph {
rubberband: true,
movable: true,
showNodeSelectionBox: true,
filter: ['groupNode'],
},
connecting: {
anchor: 'center',
@ -346,6 +347,12 @@ export default class FlowGraph {
})
})
graph.on('node:embedded', ({ cell }) => {
if (cell.shape !== 'groupNode') {
cell.toFront()
}
})
graph.bindKey('backspace', () => {
const cells = graph.getSelectedCells()
if (cells.length) {