Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gk0Wk committed Oct 18, 2023
1 parent b74884a commit 7913ab5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/echarts/plugin.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.7",
"version": "0.2.8",
"type": "application/json",
"title": "$:/plugins/Gk0Wk/echarts",
"plugin-type": "plugin",
Expand Down
3 changes: 2 additions & 1 deletion src/echarts/widget/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,15 @@ class EChartsWidget extends Widget {
this.refresh_(changedTiddlers);
// 然后节流
let count = 5;
this.timer = setTimeout(() => {
this.timer = setInterval(() => {
if (count-- <= 0 && this.tmpChangedTiddlers === undefined) {
clearInterval(this.timer);
this.timer = undefined;
}
if (this.tmpChangedTiddlers !== undefined) {
this.refresh_(this.tmpChangedTiddlers);
this.tmpChangedTiddlers = undefined;
count = Math.min(5, count + 2);
}
}, this.throttle);
}
Expand Down

0 comments on commit 7913ab5

Please sign in to comment.