Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spinner GIF overlays in demo while output generates #120

Closed
ccpandhare opened this issue Sep 10, 2017 · 2 comments
Closed

Add spinner GIF overlays in demo while output generates #120

ccpandhare opened this issue Sep 10, 2017 · 2 comments

Comments

@ccpandhare
Copy link
Collaborator

ccpandhare commented Sep 10, 2017

There are four types events that are triggered in a step's life cycle :

  • onSetup : triggered when a step is added to the sequencer
  • onDraw : triggered when the step starts to draw
  • onComplete : triggered when the step completes drawing
  • onRemove : triggered when the step is removed

Reference : README.md#creating-a-user-interface

So, between the onDraw and onComplete events, the step's output is being drawn. In the web demo, It would be a good idea to overlay the current output of the step with a "loading" GIF to let the user know that the output is still being generated.

@jywarren
Copy link
Member

jywarren commented Oct 5, 2017

This could be implemented nicely in the demo using onDraw and onComplete event handlers in this file:

https://github.com/publiclab/image-sequencer/blob/master/examples/demo.js#L79

It doesn't have an onDraw so that could be added. It does have an onComplete though. Be sure your insertion and deletion uses a unique ID so that it doesn't operate on all the steps, just the one that's running now.

The spinner itself could just be <i class="step-1 fa fa-spinner fa-spin"></i> from FontAwesome: http://fontawesome.io/icons/

(where step1 is the unique id)

@jywarren
Copy link
Member

Fixed in #143, #149.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants