Found the JS that calculates the positions of pins