public/js/controllers/MainCtrl.js
//match the height of the table when the height of the pie chart changes
match the height of the table when the height of the pie chart changes
match the height of the table when the height of the pie chart changes
function monitorPieChartHeight() {
    var observer = new MutationObserver(function(mutationsList) {
      for (var mutation of mutationsList) {
        if (mutation.type == 'attributes' && mutation.attributeName == 'style' || mutation.attributeName == 'height') {
          var newHeight = $('#' + SENTIMENT_PIE_CHART_ID).css('height');
          if (newHeight && newHeight.length > 2) {
            newHeight = newHeight.slice(0, -2);
            if (newHeight > 0) {
              setMaxTableHeight(newHeight - 14);
            }
          }
        }
      }
    });
    observer.observe(document.getElementById(SENTIMENT_PIE_CHART_ID),
      {
        attributes: true,
        childList: false
      }
    );
  }
function monitorPieChartHeight ( ) { var observer = new MutationObserver ( function ( mutationsList ) { for ( var mutation of mutationsList ) { if ( mutation . type == 'attributes' && mutation . attributeName == 'style' || mutation . attributeName == 'height' ) { var newHeight = $ ( '#' + SENTIMENT_PIE_CHART_ID ) . css ( 'height' ) ; if ( newHeight && newHeight . length > 2 ) { newHeight = newHeight . slice ( 0 , - 2 ) ; if ( newHeight > 0 ) { setMaxTableHeight ( newHeight - 14 ) ; } } } } } ) ; observer . observe ( document . getElementById ( SENTIMENT_PIE_CHART_ID ) , { attributes : true , childList : false } ) ; }
match the height of the table when the height of the pie chart changes
match the height of the table when the height of the pie chart changes
//remove 'px'