Showing
2 changed files
with
5 additions
and
0 deletions
| ... | @@ -68,6 +68,7 @@ export function clickSelect(G6) { | ... | @@ -68,6 +68,7 @@ export function clickSelect(G6) { |
| 68 | } else { | 68 | } else { |
| 69 | if (self.shouldUpdate.call(self, e)) { | 69 | if (self.shouldUpdate.call(self, e)) { |
| 70 | selectChangeFlag = true | 70 | selectChangeFlag = true |
| 71 | + // 单选选中显示边框 | ||
| 71 | graph.setItemState(item, SELECTED_STATE, true); | 72 | graph.setItemState(item, SELECTED_STATE, true); |
| 72 | } | 73 | } |
| 73 | graph.emit('nodeselectchange', {target: item, select: true}); | 74 | graph.emit('nodeselectchange', {target: item, select: true}); |
| ... | @@ -83,6 +84,7 @@ export function clickSelect(G6) { | ... | @@ -83,6 +84,7 @@ export function clickSelect(G6) { |
| 83 | // node.hideAnchor(graph) | 84 | // node.hideAnchor(graph) |
| 84 | // }); | 85 | // }); |
| 85 | // item.showAnchor(graph) | 86 | // item.showAnchor(graph) |
| 87 | + | ||
| 86 | }, | 88 | }, |
| 87 | onCanvasClick() { | 89 | onCanvasClick() { |
| 88 | 90 | ... | ... |
| ... | @@ -59,6 +59,9 @@ export default { | ... | @@ -59,6 +59,9 @@ export default { |
| 59 | graph.on('canvas:click', (e) => { | 59 | graph.on('canvas:click', (e) => { |
| 60 | context.emit('click-canvas', e) | 60 | context.emit('click-canvas', e) |
| 61 | }) | 61 | }) |
| 62 | + graph.on('node:mousedown', (e) => { | ||
| 63 | + context.emit('click-node-mousedown', e) | ||
| 64 | + }) | ||
| 62 | graph.on('node:click', (e) => { | 65 | graph.on('node:click', (e) => { |
| 63 | context.emit('click-node', e) | 66 | context.emit('click-node', e) |
| 64 | }) | 67 | }) | ... | ... |
-
Please register or login to post a comment