Example #1
0
  protected void constrainScroll(int y) {
    int full = ul.setHeight("auto").getHeight();

    int max = maxHeight != Style.DEFAULT ? maxHeight : (XDOM.getViewHeight(false) - y);
    if (full > max && max > 0) {
      activeMax = max - 10 - scrollerHeight * 2;
      ul.setHeight(activeMax, true);
      createScrollers();
    } else {
      ul.setHeight(full, true);
      NodeList<Element> nodes = el().select(".x-menu-scroller");
      for (int i = 0; i < nodes.getLength(); i++) {
        fly(nodes.getItem(i)).hide();
      }
    }
    ul.setScrollTop(0);
  }
Example #2
0
 private void resizeLiveScroller() {
   int h = grid.getHeight(true) - mainHd.getHeight(true);
   if (isHorizontalScrollBarShowing()) {
     h -= XDOM.getScrollBarWidth();
   }
   if (footer != null) {
     h -= footer.getHeight();
   }
   liveScroller.setHeight(h, true);
 }