Browse Source

solved Issue #34: Not highlighting virtual data item

Signed-off-by: chanhoonseng <chanhoonseng3101@gmail.com>
chanhoonseng 7 years ago
parent
commit
86941cf8a3
1 changed files with 9 additions and 1 deletions
  1. 9 1
      designer.html

+ 9 - 1
designer.html

@@ -1352,12 +1352,20 @@ function highlight(mydata) {
     }
     for(key in mydata) {
         //console.log(key, varname);
-        if(($("#" + key).length > 0) && (key == varname) ) {
+        /*if(($("#" + key).length > 0) && (key == varname) ) {
             //if (!$("#"+varname).hasClass("box_highlight")) {
             $("#"+key).addClass("box_highlight");
             //}
         } else {
             $("#"+key).removeClass("box_highlight");
+        }*/
+ 	if(($("#" + key).length > 0) && (varname.match(key))) {
+            //$("#"+key).addClass("box_highlight");
+            console.log("on", key, varname);
+            $("#"+varname).addClass("box_highlight");
+        } else {
+            //console.log("off");
+            $("div").not(document.getElementById(varname)).removeClass("box_highlight");
         }
     }
 }