} else {
          nextPosition = previous + height + padding(i);

          if (origin == 'top') {
            y = previous + padding(i);