Skip to content

Commit

Permalink
fix: canvas redraw bug
Browse files Browse the repository at this point in the history
fix: canvas redraw bug
  • Loading branch information
noonnightstorm authored Apr 9, 2021
2 parents bead949 + bcd8ea3 commit 5e5769a
Show file tree
Hide file tree
Showing 5 changed files with 3,073 additions and 3,088 deletions.
2 changes: 1 addition & 1 deletion docs/en-US/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ draw = (data, calllback) => {}

/**
* Re-rendering method, it will delete all previous elements and re-render
* @param {data} data - include groups, nodes, edges
* @param {data} data - new groups, nodes, and connections when redrawing
* @param {function} callback - `*the rendering process is an asynchronous process, please pay attention to the callback.`
*/
redraw = (data, calllback) => {}
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ draw = (data, calllback) => {}

/**
* 重新渲染方法,会将之前的所有元素删除重新渲染
* @param {data} data - 里面包含分组,节点,连线
* @param {data} data - 重绘时新的分组,节点,连线
* @param {function} callback - `*渲染过程是异步的过程,需要的用户请留意回调`
*/
redraw = (data, calllback) => {}
Expand Down
4 changes: 3 additions & 1 deletion example/demo/analysis/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class Scene4New extends Component {
}
}
});
this.canvas.draw(mockData);
this.canvas.draw(mockData, () => {

});
this.canvas.on('events', (data) => {
console.log(data);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "butterfly-dag",
"version": "3.2.5",
"version": "3.3.1",
"description": "一个基于数据驱动的节点式编排组件库,让你有方便快捷定制可视化流程图表",
"main": "dist/index.js",
"es": "es/index.js",
Expand Down
Loading

0 comments on commit 5e5769a

Please sign in to comment.