I\'m trying to reproduce with d3.js the behaviour of a pull cord light switch.
you can see the code running here
now my question is how can I set the distance