A force directed graph layout algorithm in JavaScript