Permalink
Browse files

Make the Spinner take up nonzero space so that elements can be under it.

Also, make it centered horizontally within its parent.
  • Loading branch information...
yonran committed Mar 31, 2012
1 parent 6d8c302 commit 97be3d6ebed0cbcd766040cc4856734668827ec5
Showing with 4 additions and 2 deletions.
  1. +4 −2 static/js/views/searchresults.js
@@ -27,8 +27,10 @@ define([
shadow : false // Whether to render a shadow
};
this.spinner = new Spinner(opts).spin();
- $(this.spinner.el).css('margin-top', $(window).height()/4);
- $(this.spinner.el).css('margin-left', $(window).width()/4);
+ var halfHeight = opts.radius + opts.length + opts.width;
+ $(this.spinner.el).css('margin-top', $(window).height()/4 + halfHeight);
+ $(this.spinner.el).css('margin-left', "50%");
+ $(this.spinner.el).css("height", halfHeight + "px");
$(this.el).append(this.spinner.el);
}
},

0 comments on commit 97be3d6

Please sign in to comment.