Skip to content

Commit

Permalink
interact track - fix logic around "supports whole genome" for zoom in…
Browse files Browse the repository at this point in the history
… notice
  • Loading branch information
jrobinso committed Jan 16, 2025
1 parent 24e6fea commit 2b6874d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/feature/interactionTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class InteractionTrack extends TrackBase {
}

get supportsWholeGenome() {
return true
return typeof this.featureSource.supportsWholeGenome === 'function' ? this.featureSource.supportsWholeGenome() : true;
}

async getFeatures(chr, start, end) {
Expand Down
4 changes: 2 additions & 2 deletions js/trackViewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class TrackViewport extends Viewport {
checkZoomIn() {

const zoomedOutOfWindow = () => {
if (this.referenceFrame.chr.toLowerCase() === "all" && !this.trackView.track.supportsWholeGenome) {
return true
if (this.referenceFrame.chr.toLowerCase() === "all") {
return !this.trackView.track.supportsWholeGenome
} else {
const visibilityWindow = this.trackView.track.visibilityWindow
return (
Expand Down

0 comments on commit 2b6874d

Please sign in to comment.