alibaba / GGEditor

A visual graph editor based on G6 and React
https://ggeditor.com
MIT License
3.42k stars 574 forks source link

onContextMenu事件会触发onNodeClick事件 #231

Open cookHu opened 5 years ago

cookHu commented 5 years ago

版本

"gg-editor": "^2.0.3"

环境

"react": "^16.2.0"

问题描述

return (
    <Flow
      grid={grid}
      shortcut={shortcut}
      data={data}
      className={styles.flow}
      graph={{ mode: 'readOnly' }}
      onClick={this.flowClick}       // 点击画布
      onNodeClick={this.nodeClick}   // 点击节点
      onContextMenu={this.flowContextMenu}
    />
);
liaohongewi commented 4 years ago

解决了嘛