b70590d5e92105ccead50ec50dee18220d568def
kate
  Fri Apr 13 15:33:47 2012 -0700
1. Change handling of hovering over experiments to suppress highlighting on IE which is too slow.  Item *28 in redmine #5149.  2.  Change handling of title (tooltip) on experiments for less overhead (assign as attribute, instead of dynamically generating on click)
diff --git src/hg/js/encodeChipMatrix.js src/hg/js/encodeChipMatrix.js
index c230d90..dd3ba4e 100644
--- src/hg/js/encodeChipMatrix.js
+++ src/hg/js/encodeChipMatrix.js
@@ -161,35 +161,37 @@
                 if (cellType === null) {
                     return true;
                 }
                 if (!matrix[cellType][target]) {
                     $td.addClass('todoExperiment');
                     return true;
                 }
                 // this cell represents experiments that
                 // fill in count, mouseover and selection by click
                 $td.addClass('experiment');
                 $td.text(matrix[cellType][target]);
                 $td.data({
                     'target' : target,
                     'cellType' : cellType
                 });
-                $td.mouseover(function() {
-                    $(this).attr('title', 'Click to select: ' +
-                                ($(this).data().target) + ' ' + ' in ' + 
-                                $(this).data().cellType +' cells');
-                });
+
+                $td.attr('title', 'Click to select: ' +  target +
+                        ' in ' + cellType +' cells');
+
+                // add highlight when moused over
+                encodeMatrix.hoverExperiment($td);
+
                 $td.click(function() {
                     var url, antibodyTarget;
 
                     // NOTE: generating full search URL should be generalized & encapsulated
                     url = encodeMatrix.getSearchUrl(encodeProject.getAssembly());
                     url +=
                        ('&hgt_mdbVar1=dataType&hgt_mdbVal1=' + 'ChipSeq' +
                        '&hgt_mdbVar2=cell&hgt_mdbVal2=' + $(this).data().cellType +
                        '&hgt_mdbVar3=antibody');
                     antibodyTarget = encodeProject.getAntibodyTarget($(this).data().target);
                     // TODO: html encode ?
                     $.each(antibodyTarget.antibodies, function (i, antibody) {
                         url += ('&hgt_mdbVal3=' + antibody);
                     });
                     url += '&hgt_mdbVar4=view&hgt_mdbVal4=Any';