Skip to content

Commit fc54030

Browse files
committed
add destroy
1 parent 5d9ed6b commit fc54030

File tree

10 files changed

+75
-31
lines changed

10 files changed

+75
-31
lines changed

README-zh.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ const config = {
6060
};
6161
6262
// 在 element 地方使用 config 渲染效果
63-
new CanvasNest(element, config);
63+
const cn = new CanvasNest(element, config);
64+
65+
// destroy
66+
cn.destroy();
6467
```
6568

6669

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ const config = {
6262
};
6363
6464
// render nest on element with config.
65-
new CanvasNest(element, config);
65+
const cn = new CanvasNest(element, config);
66+
67+
// destroy
68+
cn.destroy();
6669
```
6770

6871

dist/canvas-nest.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)