meteor-spin icon indicating copy to clipboard operation
meteor-spin copied to clipboard

Spinner now on far left of page

Open adamgins opened this issue 11 years ago • 6 comments
trafficstars

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)?

adamgins avatar Jul 28 '14 05:07 adamgins

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?

mizzao avatar Jul 29 '14 14:07 mizzao

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>

adamgins avatar Jul 31 '14 01:07 adamgins

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.

mizzao avatar Jul 31 '14 03:07 mizzao

I just pushed an update, let me know if it works better.

SachaG avatar Aug 01 '14 02:08 SachaG

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

mizzao avatar Aug 01 '14 02:08 mizzao

Thanks folks!!! :-) much appreciated - looks good.

adamgins avatar Aug 01 '14 03:08 adamgins