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/encodeDataMatrix.js src/hg/js/encodeDataMatrix.js index 549b924..3ff68a3 100644 --- src/hg/js/encodeDataMatrix.js +++ src/hg/js/encodeDataMatrix.js @@ -158,36 +158,37 @@ if (cellType === null) { return true; } if (!matrix[cellType][dataType]) { $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][dataType]); $td.data({ 'dataType' : dataType, 'cellType' : cellType }); + $td.attr('title', 'Click to select: ' + + encodeProject.getDataType(dataType).label + + ' in ' + cellType +' cells'); + + // add highlight when moused over + encodeMatrix.hoverExperiment($td); - $td.mouseover(function() { - $(this).attr('title', 'Click to select: ' + - encodeProject.getDataType($(this).data().dataType).label + - ' ' + ' in ' + $(this).data().cellType +' cells'); - }); $td.click(function() { // NOTE: generating full search URL should be generalized & encapsulated var url = encodeMatrix.getSearchUrl(encodeProject.getAssembly()); // TODO: encapsulate var names url += ('&hgt_mdbVar1=dataType&hgt_mdbVal1=' + $(this).data().dataType + '&hgt_mdbVar2=cell&hgt_mdbVal2=' + $(this).data().cellType + '&hgt_mdbVar3=view&hgt_mdbVal3=Any' ); // specifying window name limits open window glut url += '&hgt_mdbVar4=[]'; url += '&hgt_mdbVar5=[]'; url += '&hgt_mdbVar6=[]'; window.open(url, "searchWindow"); });