Skip to content

Commit

Permalink
Rearrange some of the canvas statements to properly resize teardrop s…
Browse files Browse the repository at this point in the history
…hapes. See issue #456
  • Loading branch information
cmdcolin committed Apr 9, 2014
1 parent f3543e2 commit 79e7eb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/JBrowse/View/Track/SNPCoverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,23 @@ return declare( [WiggleXY, AlignmentsMixin],
// draw indicators of SNPs if base coverage is greater than 50% of total coverage
score.forEach( function( count, category ) {
if ( !{reference:true,skip:true,deletion:true}[category] && count > 0.5*totalHeight ) {
snpContext.beginPath();
snpContext.save();
snpContext.scale(devicePixelRatio, 1);
snpContext.beginPath();
snpContext.arc( (fRect.l + 0.5*fRect.w),
0.40*snpCanvas.height/ratio,
0.20*snpCanvas.height/ratio,
1.75 * Math.PI,
1.25 * Math.PI,
false);
snpContext.restore();
snpContext.lineTo(fRect.l + 0.5*fRect.w, 0);
snpContext.closePath();
snpContext.fillStyle = thisB.colorForBase(category);
snpContext.fill();
snpContext.lineWidth = 1;
snpContext.strokeStyle = 'black';
snpContext.stroke();
snpContext.restore();
}
});

Expand Down

0 comments on commit 79e7eb5

Please sign in to comment.