Have you tried many combinations of these properties? Also, note that the algorithm stops after some amount of iteration, which defaults is set to
1000 but in general, the algorithm should find positions sooner.
I have prepared two examples of different behavior which I hope will be suitable for your case, see:
https://jsfiddle.net/BlackLabel/2r5fbws9/
https://jsfiddle.net/BlackLabel/1tm3w7u6/
Both examples meet your needs not to go to the right but as this is an algorithm, it will be much helpful to know how the elements should behave for your needs (in case of the examples or not suitable).
Looking forward to your response!