Ecotrust / forestplanner

An online tool for forest management scenario planning
BSD 3-Clause "New" or "Revised" License
29 stars 10 forks source link

Stand load progress bar [1 day] #75

Closed perrygeo closed 11 years ago

perrygeo commented 12 years ago

The stand load progress bar does not update properly. The initial bar movement (somewhat arbitrary setInterval-based) works but when it comes to updating the progressbar from within the loop, it does not work.

Initially I thought it might be the knockout bindings but we see the same behavior using jquery to update width directly; it's as if the loading loop blocks all DOM updates.

If we can't get the progress bar working smoothly, I'd rather have a simple spinner/message label.

perrygeo commented 11 years ago

related to #92

willthemoor commented 11 years ago

Before I start, let me make sure I understand the context: If a property has 10 stands, this should update 10 times from 0 to 100 (or 90%-100% as the setInterval does now) while loading/drawing them. Correct? Are there any other factors?

At the moment progressBarWidth() is getting up to 1350% and I'm not quite sure why.

Easy enough to replace with a spinner if time matters more right now. Can you help me recreate the scenario where someone will be waiting long enough to warrant real feedback on the progress of loading a JSON file?

perrygeo commented 11 years ago

Yeah a spinner would be perfect... it's pretty hard to track progress since it's mostly server-side anyways.

We might want to think about a standard waiting spinner that could be used by other ajax calls?

willthemoor commented 11 years ago

We're going spinner. This could also be generalized for all sort of 'json' loads.