code: protected double extractOffsetPosition(Element target) {
          double offsetTop = $(target).offset().top;
          double containerHeight = $(containerElement).height();
          switch (getOffsetPosition()) {
              case MIDDLE:
                  offsetTop = offsetTop - (containerHeight / 2) + ($(target).height() / 2);
                  break;
              case BOTTOM:
                  offsetTop = (offsetTop - containerHeight) + $(target).height();
                  break;
          }
  
          return offsetTop;
      }
docs: Will recalculate the offset provided by the positioning based on the container's height
  See {@link #setOffsetPosition(OffsetPosition)}