Delay Padding calculation until the header bar actually exists

This commit is contained in:
Zixaphir 2014-01-12 23:40:47 -07:00
parent d2435777ff
commit f3731397da
3 changed files with 7 additions and 3 deletions

View File

@ -13501,6 +13501,9 @@
$.asap((function() { $.asap((function() {
return d.body; return d.body;
}), this.asapInit); }), this.asapInit);
$.asap((function() {
return Header.bar.parentElement;
}), Style.padding);
$.on(window, "resize", Style.padding); $.on(window, "resize", Style.padding);
return $.ready(this.readyInit); return $.ready(this.readyInit);
}, },
@ -13525,7 +13528,6 @@
}, },
readyInit: function() { readyInit: function() {
var exLink; var exLink;
Style.padding();
Style.iconPositions(); Style.iconPositions();
if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) {
return $.on(exLink, "click", function() { return $.on(exLink, "click", function() {

View File

@ -13495,6 +13495,9 @@
$.asap((function() { $.asap((function() {
return d.body; return d.body;
}), this.asapInit); }), this.asapInit);
$.asap((function() {
return Header.bar.parentElement;
}), Style.padding);
$.on(window, "resize", Style.padding); $.on(window, "resize", Style.padding);
return $.ready(this.readyInit); return $.ready(this.readyInit);
}, },
@ -13520,7 +13523,6 @@
}, },
readyInit: function() { readyInit: function() {
var exLink; var exLink;
Style.padding();
Style.iconPositions(); Style.iconPositions();
if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) {
return $.on(exLink, "click", function() { return $.on(exLink, "click", function() {

View File

@ -28,6 +28,7 @@ Style =
$.asap (-> d.head), Style.observe $.asap (-> d.head), Style.observe
$.asap (-> d.body), @asapInit $.asap (-> d.body), @asapInit
$.asap (-> Header.bar.parentElement), Style.padding
$.on window, "resize", Style.padding $.on window, "resize", Style.padding
$.ready @readyInit $.ready @readyInit
@ -54,7 +55,6 @@ Style =
return return
readyInit: -> readyInit: ->
Style.padding()
Style.iconPositions() Style.iconPositions()
if exLink = $ "#navtopright .exlinksOptionsLink", d.body if exLink = $ "#navtopright .exlinksOptionsLink", d.body
$.on exLink, "click", -> $.on exLink, "click", ->