fixed initial layout of sense when the js is bundled and loads before the DOM

This commit is contained in:
Spencer Alger 2014-01-23 14:43:44 -07:00
parent 7da39857f2
commit 8a668374b1

View file

@ -193,11 +193,18 @@ define([
}
}
$(window).resize(function () {
if (!delay) delay = setTimeout(update, 25);
});
// update at key moments in the loading process
$(update);
$(window).load(update);
// and when the window resizes (once every 30 ms)
$(window)
.resize(function (event) {
if (!delay && event.target === window) {
delay = setTimeout(update, 30);
}
});
update();
}());
/**