Skip to content

Commit

Permalink
get feature-transfer working again
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 17, 2012
1 parent e9faeb8 commit be354b3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/JBrowse/View/Track/HTMLFeatures.js
Expand Up @@ -458,7 +458,7 @@ var HTMLFeatures = declare( BlockBased,
for (var i = 0; i < overlaps.length; i++) {
//if the feature overlaps destBlock,
//move to destBlock & re-position
sourceSlot = sourceBlock.featureNodes[overlaps[i].id];
sourceSlot = sourceBlock.featureNodes[ overlaps[i] ];
if (sourceSlot && ("label" in sourceSlot)) {
sourceSlot.label.parentNode.removeChild(sourceSlot.label);
}
Expand All @@ -467,10 +467,10 @@ var HTMLFeatures = declare( BlockBased,
&& sourceSlot.feature.get('start') < destRight ) {

sourceBlock.removeChild(sourceSlot);
delete sourceBlock.featureNodes[overlaps[i].id];
delete sourceBlock.featureNodes[ overlaps[i] ];

var featDiv =
this.renderFeature(sourceSlot.feature, overlaps[i].id,
this.renderFeature(sourceSlot.feature, overlaps[i],
destBlock, scale,
containerStart, containerEnd, destBlock );
}
Expand Down Expand Up @@ -638,6 +638,16 @@ var HTMLFeatures = declare( BlockBased,

block.featureNodes[uniqueId] = featDiv;

// record whether this feature protrudes beyond the left and/or right side of the block
if( featureStart < block.startBase ) {
if( ! block.leftOverlaps ) block.leftOverlaps = [];
block.leftOverlaps.push( uniqueId );
}
if( featureEnd > block.endBase ) {
if( ! block.rightOverlaps ) block.rightOverlaps = [];
block.rightOverlaps.push( uniqueId );
}

var strand = feature.get('strand');
switch (strand) {
case 1:
Expand Down

0 comments on commit be354b3

Please sign in to comment.