function bindAncestorScrollEvents() {
      var elem = $canvas[0];
      while ((elem = elem.parentNode) !== document.body && elem != null) {
        // bind to scroll containers only
        if (elem == $viewport[0] || elem.scrollWidth !== elem.clientWidth || elem.scrollHeight !== elem.clientHeight) {
          var $elem = $(elem);
          if (!$boundAncestors) {
            $boundAncestors = $elem;
          } else {
            $boundAncestors = $boundAncestors.add($elem);
          }
          $elem.bind("scroll." + uid, handleActiveCellPositionChange);
        }
      }
    }
// TODO:  this is static.  need to handle page mutation.
this is static.  need to handle page mutation.
this is static . need to handle page mutation .
function bindAncestorScrollEvents() {
      var elem = $canvas[0];
      while ((elem = elem.parentNode) !== document.body && elem != null) {
        if (elem == $viewport[0] || elem.scrollWidth !== elem.clientWidth || elem.scrollHeight !== elem.clientHeight) {
          var $elem = $(elem);
          if (!$boundAncestors) {
            $boundAncestors = $elem;
          } else {
            $boundAncestors = $boundAncestors.add($elem);
          }
          $elem.bind("scroll." + uid, handleActiveCellPositionChange);
        }
      }
    }
function bindAncestorScrollEvents ( ) { var elem = $canvas [ 0 ] ; while ( ( elem = elem . parentNode ) !== document . body && elem != null ) { if ( elem == $viewport [ 0 ] || elem . scrollWidth !== elem . clientWidth || elem . scrollHeight !== elem . clientHeight ) { var $elem = $ ( elem ) ; if ( ! $boundAncestors ) { $boundAncestors = $elem ; } else { $boundAncestors = $boundAncestors . add ( $elem ) ; } $elem . bind ( "scroll." + uid , handleActiveCellPositionChange ) ; } } }
TODO:  this is static.
TODO : this is static .
// bind to scroll containers only