|
@@ -4,20 +4,15 @@ export default Ember.Component.extend({
|
|
classNames: 'navbar-spacer',
|
|
classNames: 'navbar-spacer',
|
|
|
|
|
|
affixNavbar: function() {
|
|
affixNavbar: function() {
|
|
- // take navbar's height in document
|
|
|
|
|
|
+ // reserve navbar's height in document
|
|
this.$().height(this.$().height());
|
|
this.$().height(this.$().height());
|
|
|
|
|
|
// affix navbar
|
|
// affix navbar
|
|
- var offset = this.$('.navbar').offset().top;
|
|
|
|
- if (offset === 0) {
|
|
|
|
- // workaround around bootstrap affix mishandling elements
|
|
|
|
- // with resting position on top of page
|
|
|
|
- offset = 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
this.$('.navbar').affix({
|
|
this.$('.navbar').affix({
|
|
offset: {
|
|
offset: {
|
|
- top: offset
|
|
|
|
|
|
+ // workaround around bootstrap affix mishandling
|
|
|
|
+ // elements with resting position on top of page
|
|
|
|
+ top: this.$('.navbar').offset().top + 1
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}.on('didInsertElement')
|
|
}.on('didInsertElement')
|