Skip to content

Commit 2b6874d

Browse files
committed
interact track - fix logic around "supports whole genome" for zoom in notice
1 parent 24e6fea commit 2b6874d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

js/feature/interactionTrack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class InteractionTrack extends TrackBase {
142142
}
143143

144144
get supportsWholeGenome() {
145-
return true
145+
return typeof this.featureSource.supportsWholeGenome === 'function' ? this.featureSource.supportsWholeGenome() : true;
146146
}
147147

148148
async getFeatures(chr, start, end) {

js/trackViewport.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class TrackViewport extends Viewport {
9090
checkZoomIn() {
9191

9292
const zoomedOutOfWindow = () => {
93-
if (this.referenceFrame.chr.toLowerCase() === "all" && !this.trackView.track.supportsWholeGenome) {
94-
return true
93+
if (this.referenceFrame.chr.toLowerCase() === "all") {
94+
return !this.trackView.track.supportsWholeGenome
9595
} else {
9696
const visibilityWindow = this.trackView.track.visibilityWindow
9797
return (

0 commit comments

Comments
 (0)