catdadcode / angular-spinners

A library for easily managing loading spinners in complex Angular2+ applications.
MIT License
140 stars 49 forks source link

Use visibility hidden instead of ng-show #15

Closed seblucas closed 8 years ago

seblucas commented 8 years ago

Thanks for this plugin !

What do you think about changing visibility instead of using ng-show. It will avoid messing up the layout if there some div around.

You can use something like that : ng-style="{'visibility' : show ? 'visible' : 'hidden'}"

I can do a PR if you want, but I don't know if I can keep both ways.

catdadcode commented 8 years ago

I thought about this. On my team it turned out to be most common that we wanted the space freed up when the spinner isn't shown. We prefer the user to style the spinner element with CSS to position it how you want it. You could always put the spinner in a parent container with a static height and width to produce the same affect.

Hope that helps! :)

seblucas commented 8 years ago

Of course you're right, I was so used to change visibility that I did not thought of adding a parent div.

So no need to change anything. Thanks.