code: function recalculatePosition() {
        scope.position = appendToBody ? $position.offset(element) : $position.position(element);
        scope.position.top += element.prop('offsetHeight');
      }
docs: recalculate actual position and set new values to scope after digest loop is popup in right position