Skip to content

Commit

Permalink
fix: update label event bug
Browse files Browse the repository at this point in the history
  • Loading branch information
noonnightstorm committed Jun 15, 2021
1 parent 6d73990 commit 32286aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-visual-modeling",
"version": "1.0.37",
"version": "1.0.38",
"description": "一个基于React的数据可视化建模的DAG图,适用于UML,数据库建模,数据仓库建设等业务",
"main": "dist/index.js",
"pack": "pack/index.js",
Expand Down
11 changes: 10 additions & 1 deletion src/canvas/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,16 @@ export default class TableCanvas extends Canvas {
});

this.getEdge(info.edge.id);
edge && edge.updateLabel(info.label);
if (edge) {
edge.updateLabel(info.label);
$(edge.labelDom).on('dblclick',(e) => {
e.preventDefault();
e.stopPropagation();
edge.emit('custom.edge.dblClick',{
edge
});
});
}
})
}

Expand Down

0 comments on commit 32286aa

Please sign in to comment.