Skip to content

fix/time unit not updating in total time#80

Merged
schoinh merged 2 commits intomasterfrom
fix/time-unit-not-updating
Dec 9, 2020
Merged

fix/time unit not updating in total time#80
schoinh merged 2 commits intomasterfrom
fix/time-unit-not-updating

Conversation

@schoinh
Copy link
Copy Markdown
Contributor

@schoinh schoinh commented Dec 8, 2020

While I was testing with a trajectory in nanosecond-scale I noticed the unit in the total time wasn't updating -- it's because I was using a regular variable unitIndex instead of creating a local state for it. React 101. Let me know if you want test data and I'll send it to you.

Pull request recommendations:

  • Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
  • Link to any relevant issue in the PR description. Ex: Resolves [gh-##], adds tiff file format support
  • Provide description and context of changes, including any helpful screenshots.
  • Provide relevant tests for your feature or bug fix.
  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@schoinh schoinh requested review from a user, blairlyons, meganrm and toloudis December 8, 2020 03:24
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log/#Examples
*/
unitIndex = Math.ceil(Math.log(1 / lastFrameTime) / Math.log(1000));
let unitIndex = Math.ceil(Math.log(1 / lastFrameTime) / Math.log(1000));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggest renaming this so it doesn't conflict at all with unitIndex from line 40.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed it to index, hopefully it's not too vague..........

@schoinh schoinh merged commit 555255e into master Dec 9, 2020
@schoinh schoinh deleted the fix/time-unit-not-updating branch December 9, 2020 18:00
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.

3 participants