New JS files
Slight change in autocomplete for bug fix
Separated the old script.js in function-oriented different files
diff --git a/js/circle-mode.js b/js/circle-mode.js
new file mode 100644
index 0000000..ea5f423
--- /dev/null
+++ b/js/circle-mode.js
@@ -0,0 +1,32 @@
+window.addEventListener("load", initCircleMode);
+
+circleMode = false;
+
+function initCircleMode() {
+ document.querySelector("#circle-mode").addEventListener('click', function() {
+ if(circleMode) {
+ circleMode = false;
+ document.querySelector("#circle-mode i").innerText = "trip_origin";
+
+ s.graph.nodes().forEach(function(n) {
+ n.x = n.originalX;
+ n.y = n.originalY;
+ n.size = 10;
+ });
+
+ s.refresh();
+
+ }
+ else {
+ circleMode = true;
+ document.querySelector("#circle-mode i").innerText = "shuffle";
+
+ s.graph.nodes().forEach(function(n) {
+ n.x = n.circleX;
+ n.y = n.circleY;
+ });
+
+ s.refresh();
+ }
+ });
+}
\ No newline at end of file