cinemascience / cinema_components

A JavaScript library for building Cinema viewers
Other
2 stars 5 forks source link

Added new implmentation of spec d file monitoring based on Cameron's suggestions #13

Closed dtorban closed 6 years ago

dtorban commented 6 years ago

I created a refreshData() method that allows applications to refresh. In the pcoords example, I added two interval timers, one that just looks at file size changes to avoid overhead and one that looks at the full data set.

When a change happens it calls the dataUpdated dispatcher.

I had to move the dimension calculation into its own method so that I could call it when the database updates.

dtorban commented 6 years ago

By the way, feel free to make more suggestions based on this pull request. I'll be happy to continue updating it to achieve the best implementation.

dtorban commented 6 years ago

The only thing I didn't change was the UpdateInfo object, so I am open to suggestions there. Bandit needed to know the modified or added rows so that it only refreshed those.

camtauxe commented 6 years ago

Looks great! I'm merging this into another branch for now where I'll add my part and then do a bunch of testing and stuff to make sure it all works before merging it into the master. Thank you.