FIX: Better height estimation / observing for menu panels

This commit is contained in:
Robin Ward 2015-09-16 14:46:35 -04:00
parent d61cfbe2aa
commit 63f0247d21
2 changed files with 2 additions and 3 deletions

View file

@ -43,7 +43,6 @@ export default Ember.Component.extend({
$panelBody.height(contentHeight);
$('body').addClass('drop-down-visible');
} else {
const menuTop = headerHeight();
let height;
@ -127,7 +126,7 @@ export default Ember.Component.extend({
_watchSizeChanges() {
if (mutationSupport) {
this._observer.disconnect();
this._observer.observe(this.element, { childList: true, subtree: true });
this._observer.observe(this.element, { childList: true, subtree: true, attributes: true });
} else {
clearInterval(this._resizeInterval);
this._resizeInterval = setInterval(() => {

View file

@ -45,7 +45,7 @@ export default Ember.Component.extend({
if (this.get('loadingNotifications')) { return; }
// estimate (poorly) the amount of notifications to return
var limit = Math.round(($(window).height() - headerHeight()) / 50);
var limit = Math.round(($(window).height() - headerHeight()) / 55);
// we REALLY don't want to be asking for negative counts of notifications
// less than 5 is also not that useful
if (limit < 5) { limit = 5; }