Options for diagonal placement added

Combinations of top/bottom and left/right are allowed
Added auto boundary checking on resize and scroll