This should fix the issue #331 (as introduced by #329) by moving the repositioning after the initial calculation.
Additionally, I reset the values of this.arrowTop and this.cpArrowPosition to avoid misplacement of the arrow when this.cpPosition changes on a subsequent call.
I also changed the if-else to a switch-case for a better readability.
This should fix the issue #331 (as introduced by #329) by moving the repositioning after the initial calculation.
Additionally, I reset the values of
this.arrowTop
andthis.cpArrowPosition
to avoid misplacement of the arrow whenthis.cpPosition
changes on a subsequent call.I also changed the if-else to a switch-case for a better readability.
Closes #331