973799e0105452c5abc032e7b036a43c81259f00 max Fri Sep 4 03:23:15 2020 -0700 next step of fixing the highlight bug with the new format, refs #26166 diff --git src/hg/js/utils.js src/hg/js/utils.js index b0184cc..aabb4f9 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1203,30 +1203,39 @@ out.start = pos.start; out.end = pos.end; } } else { // new format parts = position.split("#"); out.db = parts[0]; out.chrom = parts[1]; out.start = parseInt(parts[2]); out.end = parseInt(parts[3]); out.color = "#" + parts[4]; } return out; } +function getHighlight(highlightStr, index) +/* Parse out highlight at index and return as a position object (see parsePositionWithDb) */ +{ + var hlStrings = highlightStr.split("|"); + var myHlStr = hlStrings[index]; + var posObj = parsePositionWithDb(myHlStr); + return parsePositionWithDb(posObj); +} + function getSizeFromCoordinates(position) { // Parse size out of a chr:start-end string var o = parsePosition(position); if (o) { return o.end - o.start + 1; } return null; } // This code is intended to allow setting up a wait cursor while waiting on the function var gWaitFuncArgs = []; var gWaitFunc; function waitMaskClear()