Close CAT-1060 #resolve fix ifOnEdgeBounce logic

change repositioning logic
adapt tests
differ between horizontal and vertical border