Fixed offset and Aspect ratio algorithm

[Done]
 - Fixed offset of the rectangle
 - Fixed optimalNumElementHeightAspect
[ToDo]
 - Borderline interaction