Skip to content

Commit

Permalink
some optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 16, 2012
1 parent 9c60e52 commit c91f3c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JBrowse/View/Layout2.js
Expand Up @@ -25,7 +25,7 @@ return declare( null,
var pHeight = Math.ceil( height / this.pitchY );

var midX = Math.floor((pLeft+pRight)/2);
var rectangle = { id: id, l: pLeft, r: pRight, mX: midX, h: pHeight };
var rectangle = { id: id, l: pLeft, r: pRight, mX: midX, h: pHeight, refCount: 0 };
for( var top=0; top<this.bitmap.length; top++ ){
if( this._collides(rectangle,top) )
top++;
Expand Down Expand Up @@ -87,7 +87,7 @@ return declare( null,
if(!vertSlice.ids)
vertSlice.ids = {};
vertSlice.ids[rect.id] = (vertSlice.ids[rect.id]||0) + 1;
rect.refCount = (rect.refCount || 0) + 1;
rect.refCount++;
}
},

Expand Down

0 comments on commit c91f3c2

Please sign in to comment.