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 background option #348

Closed
ttodua opened this issue Dec 28, 2017 · 2 comments
Closed

Add spinner background option #348

ttodua opened this issue Dec 28, 2017 · 2 comments

Comments

@ttodua
Copy link

ttodua commented Dec 28, 2017

It will be nice if you just add the blackground (like the jquery-ui dialog with "modal:true" parameter), to make the dark background during the spinner spins.

at this moment we have to use some custom codes and annoying;

$("body").append('<div id="blackground_spinner" style="width:100%;height:100%;position:fixed;background:white; z-index:12; opacity:0.8;"></div>');
my_spinner = new Spinner(opts).spin();
$("body").append(my_spinner.el);

//remove:
$("#blackground_spinner").remove();
my_spinner_sampleTT.el.remove();

so, why wont you just give us simple option, i.e.
{
.....
background: #e7e7e725; //so, this contains opacity too: the last 25 means alpha opacity.
}

@theodorejb
Copy link
Collaborator

For one thing I don't think the suggested API makes sense (appending an opacity percentage to a hex color string). It would be better to have separate properties for background color and opacity.

But ultimately a feature like this is outside the scope of spin.js. It would add a size and maintenance cost, and wouldn't be useful for people who want to animate the background or add other content to it. I would suggest writing your own function or library for this if you use this pattern in multiple places.

@theodorejb theodorejb changed the title Please add background shadow Add spinner background option Dec 11, 2019
@ttodua
Copy link
Author

ttodua commented Dec 11, 2019

thanks for answering, but, i can't clearly understand what maintenance costs or sizes are being talked - 300 bytes? and moreover, in all sites almost, where there is shown spinner/waiter , the background is dimmed.
so, dimming a background when waiter is shown, is (imho) a standard practice and "more like to happen", so adding 300 bytes for quite useful feature, would have been nice. (probably even if out of scope, would have been just nice to have that too).
one user (as of me) says this as his usage case of your product (and there might be many who just didnt open this topic, but wished same).
but you are maintainer and you make decision. you know it better.
regards anyway. nice work. thanks

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