Closed cojarbi closed 8 years ago
I just added #125 for this. Give it a whirl.
I do see that something its going on as now the screen goes darker, but the message comes and goes to fast. Try it with the attached image.
If you can please use the same loading indicator as the raster process. Besides not being intrusive it also lets you do some other stuff in the screen
http://ricostacruz.com/nprogress/ .start, .inc, and done should do...
On Sep 9, 2016 9:46 PM, "Ariel Yahni" notifications@github.com wrote:
I do see that something its going on as now the screen goes darker, but the message comes and goes to fast. Try it with the attached image.
If you can please use the same loading indicator as the raster process. Besides not being intrusive it also lets you do some other stuff in the screen
[image: moon_large] https://cloud.githubusercontent.com/assets/16444438/18400544/0457000e-769c-11e6-9160-ac5d54f704cf.jpg
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openhardwarecoza/LaserWeb3/issues/122#issuecomment-246019344, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr220a07ekU2R2g_Adio4gu0-ISfqTks5qobeBgaJpZM4J4nXE .
Ah, I didn't notice that there was an existing progress indicator for the UI. I'll change over to that
@openhardwarecoza So, Potrace doesn't seems to fire any progress events, so I don't think anything will call .inc at all, but that's OK, because nprogress fakes progress automatically :) I'm working on this one; I'm out of town for a bit, but I'll get it.
Messed with this some more... Potrace runs the Javascript thread at 100% while it's tracing, and it seems that no progress events fire, even when I put it on a dedicated timer, and even when I stuck an .inc() call directly in Potrace. I'll have to work on this one more.
So I'm stuck on this simple request; the JS just wedges up tight while Potrace is running, and I don't get any motion of the bar. I'm tabling this for a bit until I think of something else.
We may need to rewrite the potrace library to work in chunks like I did here https://github.com/openhardwarecoza/LaserWeb/commit/41ee83ed3e7124e4cf346e2cf78de991648e818d#diff-681a90cbc63da7ac6566acc75887b718R203
that doChunk function takes what would normally be a loop, and does it in chunks instead - each chunk ties up the browser for maxTimePerChunk, after which it releases, we can then do a GUI update like nprogress, and then it takes the next chunk for processing...
Oh boy... I'll have to spend some time to grok that one. For now, I did change it over to NProgress, although it doesn't update much if at all while Potrace is running. It's at least consistent with raster generation now, though.
Closing this for now...
Currently there is not indication that there an ongoing process. For large or complex images trace and take some time. Maybe add the same indicator as raster