Skip to content

Commit

Permalink
Disable strand arrows at certain scale
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Oct 31, 2018
1 parent f30b492 commit 7238ac1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/JBrowse/View/FeatureGlyph/Box.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ return declare([ FeatureGlyph, FeatureLabelMixin], {
if( bgcolor ) {
context.fillStyle = bgcolor;
context.fillRect( left, top, Math.max(1,width), height );
if(this.config.style.strandInlay && width > 1) {
if(this.config.style.strandInlay && viewInfo.scale > 0.2 ) {
var arrowWidth = this.config.style.strandInlayWidth
if(feature.get('strand') === 1) {
context.beginPath();
Expand Down Expand Up @@ -364,7 +364,7 @@ return declare([ FeatureGlyph, FeatureLabelMixin], {
mouseoverFeature( context, fRect ) {
this.inherited(arguments)
var feature = fRect.f
if(this.config.style.strandInlay) {
if(this.config.style.strandInlay && fRect.viewInfo.scale > 0.2) {
var arrowWidth = this.config.style.strandInlayWidth
var top = fRect.t
var height = fRect.rect.h
Expand Down
2 changes: 1 addition & 1 deletion src/JBrowse/View/Track/Alignments2.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ return declare( [ CanvasFeatureTrack, AlignmentsMixin ], {
if(this.config.viewAsPairs) {
let supermethod = this.getInherited(arguments)
var reg = this.browser.view.visibleRegion()
var len = reg.end - reg.start
var len = Math.max(reg.end - reg.start, 4000)
const region = {
ref: this.refSeq.name,
start: Math.max( 0, reg.start ),
Expand Down

0 comments on commit 7238ac1

Please sign in to comment.