890fdad386e5451ba705effa51a3877bce2e4bdb braney Mon Nov 4 14:26:54 2019 -0800 added a comment about a function that doesn't work right when an assembly database name has a '.' in it diff --git src/hg/js/utils.js src/hg/js/utils.js index b206949..1e476f7 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -1145,30 +1145,32 @@ var a = /(\S+):(\d+)-(\d+)/.exec(position); if (a && a.length === 4) { var o = {}; o.chrom = a[1]; o.start = parseInt(a[2]); o.end = parseInt(a[3]); return o; } } return null; } function parsePositionWithDb(position) // Parse db.chr:start-end string into a db, chrom, start, end object // Also supports be db.chr:start-end#color string +// Doesn't work right with db's with '.'s in them. Is this ever +// used when the db isn't the same one as getDb() would return? { var out = {}; var parts = position.split("."); if (parts.length === 2) { out.db = parts[0]; position = parts[1]; } else { out.db = getDb(); // default the db } parts = position.split("#"); // Highlight Region may carry its color if (parts.length === 2) { position = parts[0]; out.color = '#' + parts[1]; } var pos = parsePosition(position);