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

Reinitialisation of spinner with arguments (duration) #205

Closed
tmundt opened this issue Mar 14, 2014 · 3 comments
Closed

Reinitialisation of spinner with arguments (duration) #205

tmundt opened this issue Mar 14, 2014 · 3 comments

Comments

@tmundt
Copy link

tmundt commented Mar 14, 2014

Is it possible to change the behaviour of the spinner during runtime?
Let's say you a spinner started with a color of green and the color should change later on?
Is it possible to do something like:
var spinner = new Spinner().spin(target);
$timeout(function() {
spinner.color = #343434;
}, 1000);

@fgnass
Copy link
Owner

fgnass commented Mar 14, 2014

I'm not sure if I understand your question correctly. There is no option called duration. The amount of time for which the spinner is visible is controlled by the application using it:

var s = new Spinner().spin(target);

// stop it after 10s
setTimeout(function() { s.stop() }, 10000); 

// ... then change your mind and stop it after 3s
setTimeout(function() { s.stop() }, 3000);

@tmundt
Copy link
Author

tmundt commented Mar 14, 2014

Sorry I edited my question.
If a spinner is stopped after 10 seconds how can it be stopped again after 3 seconds? Will the timeout be overwritten?

Thank you for a great js-tool!

Yours Thomas

@theodorejb
Copy link
Collaborator

Closing in favor of #256.

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

No branches or pull requests

3 participants