Skip to content

Commit

Permalink
Only initialize smaller regions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 18, 2018
1 parent 60883d6 commit 894e569
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/JBrowse/View/Track/Alignments2.js
Expand Up @@ -218,19 +218,22 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
this._handleError(e, args)
finishCallback(e)
}
this.init = this.init || false

if(this.config.viewAsPairs || this.config.viewAsSpans || this.config.colorByOrientation) {
let supermethod = this.getInherited(arguments)
const len = Math.min(Math.max(args.rightBase - args.leftBase, 4000), 100000)
const len = Math.max(args.rightBase - args.leftBase, 4000)
const region = {
ref: this.refSeq.name,
start: Math.max(0, args.leftBase),
end: args.rightBase,
viewAsPairs: true
}
const e = 30
const min = Math.max(0, region.start - len * e)
const max = region.end + len * e
const e = this.init ? 2 : 30
this.init = true
console.log(e)
const min = Math.max(0, region.start - Math.min(len * e, 100000))
const max = region.end + Math.min(len * e, 100000)
var cachePromise = new Promise((resolve, reject) => {
this.store.getFeatures({
ref: this.refSeq.name,
Expand Down

0 comments on commit 894e569

Please sign in to comment.