Skip to content

Commit

Permalink
fix: persist subsribe state on full update (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
zefirka authored Nov 22, 2023
1 parent 061ade4 commit b0721d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/YagrCore/mixins/batch-updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export class BatchMixin<T extends MinimalValidConfig> {
if (left && top && left > 0 && top > 0) {
this.uplot.setCursor({left, top});
}

// by default uPlot subsribes self to cursor, if we don't need it, we should unsubscribe manually
if (!this.state.subscribed) {
this.unsubscribe();
}
})
.inStage('listen');
}
Expand Down

0 comments on commit b0721d9

Please sign in to comment.