Merge pull request #12 from Huguet57/patch-6
Independence of time
diff --git a/TODO.md b/TODO.md
index 21fbf6d..2521a35 100644
--- a/TODO.md
+++ b/TODO.md
@@ -2,7 +2,7 @@
1. Make limit-years prettier and inclusive/exclusive with double check-boxes
2. Make statistics about the graph: biggest K_n, diameter, etc...
3. Make circle-mode + year-limit = smaller-circle-mode
-4. Modify the autocomplete so that eliminated nodes don't appear
+~~4. Modify the autocomplete so that eliminated nodes don't appear~~
5. Separate non-connex nodes in circle-mode
6. Add all these TODO items to the bug tracker
diff --git a/js/autocomplete.js b/js/autocomplete.js
index 36bfa8c..cb3c28f 100644
--- a/js/autocomplete.js
+++ b/js/autocomplete.js
@@ -1,6 +1,6 @@
// *********** HERE STARTS autocomplete.js *************
-function autocomplete(inp, obj, act) {
+function autocomplete(inp, obj, act, rectBorrar) {
/*the autocomplete function takes two arguments,
the text field element and an objay of possible autocompleted values:*/
var currentFocus;
@@ -18,6 +18,8 @@
for (node in obj) {
var nomNode = obj[node].name;
+ if (isInRect(obj[node].x, obj[node].y, rectBorrar)) continue;
+
if (nomNode.toUpperCase().includes(val.toUpperCase())) {
is_empty = false;
var parts = nomNode.toUpperCase().split(val.toUpperCase());
diff --git a/js/just-do-it.js b/js/just-do-it.js
index cba9600..05d8da5 100644
--- a/js/just-do-it.js
+++ b/js/just-do-it.js
@@ -26,7 +26,7 @@
function initJustDoIt() {
- document.addEventListener("keydown", function() {
+ document.addEventListener("keydown", function(event) {
if (event.key == "f" && event.target.getAttribute("id") != "search-input") altSearchBar();
if (event.which == seq[cur]) {
if (cur < seq.length) {