Skip to content
Permalink
Browse files

Lag reduced when zooming

  • Loading branch information
csw11004 committed Aug 10, 2015
1 parent 6fa59af commit dc3f36b32adc0e445feb37d9a3a16bfa2a4de42a
Showing with 21 additions and 9 deletions.
  1. +21 −9 VQI_GenomeBrowser.js
@@ -849,9 +849,18 @@ function VQI_GenomeBrowser(id, serviceURL) {
var offset = type == "cpg" ? -20 : type == "shore" ? -10 : -7.5;
return offset;//height / 2 + margin + offset
})
.each(function(d){
addTooltip($(this), name, d[indexArray.type]);
})

addTooltip($(trackScalableGroup.selectAll("rect")
.filter(function (d) {
return d[indexArray.type] == "cpg";})[0]), name, "cpg");

addTooltip($(trackScalableGroup.selectAll("rect")
.filter(function (d) {
return d[indexArray.type] == "shore";})[0]), name, "shore");

addTooltip($(trackScalableGroup.selectAll("rect")
.filter(function (d) {
return d[indexArray.type] == "shelve";})[0]), name, "shelve");
}

var addBEDTrack = function (data, name, exons) {
@@ -911,9 +920,10 @@ function VQI_GenomeBrowser(id, serviceURL) {
})
.style("vector-effect", "non-scaling-stroke")
.attr("class", "scalable")
.each(function(d){
addTooltip($(this), name, "gene")
})

addTooltip($(trackScalableGroup.selectAll("rect")
.data(data, function (d) {
return d;})[0]), name, "gene")

if (exons)
{
@@ -947,9 +957,11 @@ function VQI_GenomeBrowser(id, serviceURL) {
.style("fill", "black")
.style("vector-effect", "non-scaling-stroke")
.attr("class", "scalable")
.each(function(d){
addTooltip($(this), name, "exon")
})

addTooltip($(trackScalableGroup.selectAll("rect")
.data(exons, function (d) {
return d;})[0]), name, "exon")

}
}

0 comments on commit dc3f36b

Please sign in to comment.
You can’t perform that action at this time.