datastructures-dev / datastructures-dev.github.io

Web based visualisations and examples of common data-structures and algorithms
https://datastructures.dev
MIT License
3 stars 0 forks source link

Heap remains on the page when navigating away from heap #5

Open danjones1618 opened 4 years ago

danjones1618 commented 4 years ago

Once heap has been created it remains on the page indefinitely.

From a quick look at the code this appears to be because the animation is not managed by React.

It may be worth to use P5.js for animations of graphs https://p5js.org

This can be integrated with React via https://dev.to/christiankastner/integrating-p5-js-with-react-i0d

dl1683 commented 4 years ago

What do you mean, heap remains indefinitely?

danjones1618 commented 4 years ago

Start the heap animation and then browse to a different page - the animation remains forever