Skip to content

Commit

Permalink
Merge pull request #949 from wangzhengbo/do_not_deselect_other_select…
Browse files Browse the repository at this point in the history
…ed_elements_when_right_click_a_selected_edge

右击一条选中的边时不要取消选中其它已经选中的节点和边方便做批量操作
  • Loading branch information
towersxu committed Dec 18, 2022
2 parents 0dc9a83 + bc7d0c0 commit 3a21a9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/view/edge/BaseEdge.tsx
Expand Up @@ -159,7 +159,9 @@ export default class BaseEdge extends Component<IProps> {
});
graphModel.setElementStateById(model.id, ElementState.SHOW_MENU, position.domOverlayPosition);
this.toFront();
graphModel.selectEdgeById(model.id);
if (!model.isSelected) {
graphModel.selectEdgeById(model.id);
}
// 边数据
const edgeData = model?.getData();
graphModel.eventCenter.emit(EventType.EDGE_CONTEXTMENU, {
Expand Down

0 comments on commit 3a21a9f

Please sign in to comment.