Trackster: fix strand drawing for single blocks with no thin/thick part

This commit is contained in:
James Taylor
2011-11-07 18:22:47 -05:00
parent c4cb89efc2
commit 98513d7e2f
+7 -7
View File
@@ -4385,17 +4385,17 @@ extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
// Draw feature/feature blocks + connectors.
if (!feature_blocks) {
// If there are no blocks, treat the feature as one big exon.
if ( feature.strand ) {
if (feature.strand === "+") {
ctx.fillStyle = block_color;
ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
// If strand is specified, draw arrows over feature
if ( feature_strand ) {
if (feature_strand === "+") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand_inv' );
} else if (feature.strand === "-") {
} else if (feature_strand === "-") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand_inv' );
}
ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
}
else { // No strand.
ctx.fillStyle = block_color;
}
ctx.fillRect(f_start, y_center, f_end - f_start, thick_height);
} else {
//
// There are feature blocks and mode is either Squish or Pack.