Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In local clock mode, if we're panning or zooming, don't purge older records #3996

Merged
merged 2 commits into from
Jul 7, 2021

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Jul 7, 2021

Resolves #3992

All Submissions:

Author Checklist

  • Changes address original issue?
  • Unit tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue?

@unlikelyzero unlikelyzero linked an issue Jul 7, 2021 that may be closed by this pull request
// Drop any data that is more than 1x (max-min) before min.
// Limit these purges to once a second.
if (!this.nextPurge || this.nextPurge < Date.now()) {
if (!this.isTimeOutOfSync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can declare variables for this and remove comments? something like

const isPanningOrZooming = this.isTimeOutOfSync;
const isPurgeData = !isPanningOrZooming && (!this.nextPurge || this.nextPurge < Date.now()));
if (isPurgeData) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SURE!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@nikhilmandlik nikhilmandlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small change/suggestion

@shefalijoshi shefalijoshi merged commit 558b802 into 1.7.4-stable Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overlay plots do not fetch historical data on zoom or pan
2 participants