meteor-spin
meteor-spin copied to clipboard
Spinner now on far left of page
I am not sure what changed, perhaps I ran "mrt update"? But now my spinner shows on far left of page (actually slightly off the page).
All I have is:
<template name="loading">
{{> spinner}}
</template>
my router has:
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
I tried mrt remove spin, mrt add spin, mrt update ... same thing. I see there are params "top" and "left", do I need to start specifying them?
Just wondering if anything changed as it's been working fine (centered) as-is for the past couple of months (give or take)?
I submitted a PR so that the {{> spinner}} template now centers itself in whatever its parent is in. The default values for top and left are 50% and there is a negative top and left margin.
What does the parent container look like that you are putting the spinner in?
Sorry for slow reply, been travelling. Thanks heaps for helping here. Being new to github, how do I actually get this code?
re: "parent container" not much in there.. .my "main.html" only has
some stuff then I think this get's pulled in right? Or is the "layoutTemplate" in effect whilst loading? if so:<template name="layout">
<div class="container-fluid">
{{> header}}
{{> errors}}
<div class="row-fluid">
{{> yield}}
</div>
<div class="=row-fluid" style="min-height: 100px">
</div>
</div>
</template>
Where is the spinner going in that layout?
It's possible you are putting the spinner directly on the body. In that case you want to set a width on the body, or put the spinner in a container with a width and a height - otherwise it will just appear in the corner.
I just pushed an update, let me know if it works better.
Ah yes, I had to set that as well in my app after updating the spinner. Good catch.
https://github.com/mizzao/CrowdMapper/blob/master/client/helpers.coffee
Thanks folks!!! :-) much appreciated - looks good.