Merge pull request #9 from Huguet57/patch-3

Remove trash nodes from autocomplete
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());