The dragEnd() function, triggered by pointerup, needs to make sure the switch is in an allowed position. Currently it is possible to drag the switch, then without releasing the finger drag outside of the switch so that the switch is in an "in-between" visual state, and then release the finger.
|
const dragEnd = event => { |
