@@ -29,7 +29,7 @@ import { VariantViewModal } from './ui/VariantViewModal';
29
29
import 'bootstrap/dist/css/bootstrap.min.css' ;
30
30
import * as bootstrap from 'bootstrap/dist/js/bootstrap.bundle.min' ;
31
31
32
- import { Track , getTrackDocData } from './ui/trackData .js' ;
32
+ import { Track , getTrackDocData } from './ui/getTrackDocData .js' ;
33
33
34
34
const db = new Database ( ) ;
35
35
const log = new BrowserDatabase ( ) ;
@@ -565,7 +565,7 @@ function App(props: RouteComponentProps) {
565
565
const HEIGHTS_OF_TRACKS_SHOWN = TRACK_DATA . filter ( d => tracksShown . includes ( d . type ) ) ;
566
566
567
567
// Calculate the positions of the tracks
568
- const trackPositions = tracksShown . flatMap ( ( t , i ) => {
568
+ const trackPositions = tracksShown . map ( ( t , i ) => {
569
569
const indexOfTrack = HEIGHTS_OF_TRACKS_SHOWN . findIndex ( d => d . type === t ) ;
570
570
const cumHeight = HEIGHTS_OF_TRACKS_SHOWN . slice ( 0 , indexOfTrack ) . reduce ( ( acc , d ) => acc + d . height , 0 ) ;
571
571
const position = {
@@ -574,11 +574,7 @@ function App(props: RouteComponentProps) {
574
574
title : HEIGHTS_OF_TRACKS_SHOWN [ indexOfTrack ] . title ,
575
575
popover_content : HEIGHTS_OF_TRACKS_SHOWN [ indexOfTrack ] . popover_content
576
576
} ;
577
- if ( t === 'alignment' || t === 'coverage' || t === 'sequence' ) {
578
- return [ position , { ...position , x : visPanelWidth / 2 + 10 } ] ;
579
- } else {
580
- return [ position ] ;
581
- }
577
+ return position ;
582
578
} ) ;
583
579
584
580
return (
@@ -608,8 +604,8 @@ function App(props: RouteComponentProps) {
608
604
data-bs-content = { d . popover_content }
609
605
style = { {
610
606
position : 'absolute' ,
611
- top : d . y + ( d . type === 'ideogram' ? 32 : 0 ) ,
612
- left : ( 'x' in d && d . x ? d . x : 0 ) + 10
607
+ top : d . y + ( d . type === 'ideogram' ? 32 : 0 ) - 1 ,
608
+ left : 10
613
609
} }
614
610
>
615
611
< svg className = "button question-mark" viewBox = { ICONS . QUESTION_CIRCLE_FILL . viewBox } >
@@ -1139,77 +1135,69 @@ function App(props: RouteComponentProps) {
1139
1135
} }
1140
1136
/>
1141
1137
) }
1142
- { isMinimalMode ? (
1143
- < div className = "navigation-buttons" >
1144
- < div className = "navigation-button-container split navigation-button-genome" >
1145
- < button
1146
- className = "navigation-button split-left"
1147
- tabIndex = { 1 }
1148
- onClick = { ( ) => {
1149
- setTimeout (
1150
- ( ) =>
1151
- document
1152
- . getElementById ( 'gosling-panel' )
1153
- ?. scrollTo ( { top : 0 , behavior : 'smooth' } ) ,
1154
- 0
1155
- ) ;
1156
- } }
1157
- >
1158
- Genome View
1159
- </ button >
1160
- < button
1161
- className = "navigation-button split-right"
1162
- tabIndex = { 1 }
1163
- data-bs-toggle = "modal"
1164
- data-bs-target = "#genome-view-modal"
1165
- >
1166
- < svg
1167
- className = "button question-mark"
1168
- viewBox = { ICONS . QUESTION_CIRCLE_FILL . viewBox }
1169
- >
1170
- < title > Question Mark</ title >
1171
- { ICONS . QUESTION_CIRCLE_FILL . path . map ( p => (
1172
- < path fill = "currentColor" key = { p } d = { p } />
1173
- ) ) }
1174
- </ svg >
1175
- </ button >
1176
- </ div >
1177
- < div className = "navigation-button-container split navigation-button-variant" >
1178
- < button
1179
- className = "navigation-button split-left"
1180
- tabIndex = { 1 }
1181
- onClick = { ( ) => {
1182
- setTimeout ( ( ) => {
1183
- document . getElementById ( 'variant-view' ) ?. scrollIntoView ( {
1184
- block : 'start' ,
1185
- inline : 'nearest' ,
1186
- behavior : 'smooth'
1187
- } ) ,
1188
- 0 ;
1189
- } ) ;
1190
- } }
1191
- >
1192
- Variant View
1193
- </ button >
1194
- < button
1195
- className = "navigation-button split-right"
1196
- tabIndex = { 1 }
1197
- data-bs-toggle = "modal"
1198
- data-bs-target = "#variant-view-modal"
1199
- >
1200
- < svg
1201
- className = "button question-mark"
1202
- viewBox = { ICONS . QUESTION_CIRCLE_FILL . viewBox }
1203
- >
1204
- < title > Question Mark</ title >
1205
- { ICONS . QUESTION_CIRCLE_FILL . path . map ( p => (
1206
- < path fill = "currentColor" key = { p } d = { p } />
1207
- ) ) }
1208
- </ svg >
1209
- </ button >
1210
- </ div >
1138
+ < div className = "navigation-buttons" >
1139
+ < div className = "navigation-button-container split navigation-button-genome" >
1140
+ < button
1141
+ className = "navigation-button split-left"
1142
+ tabIndex = { 1 }
1143
+ onClick = { ( ) => {
1144
+ setTimeout (
1145
+ ( ) =>
1146
+ document
1147
+ . getElementById ( 'gosling-panel' )
1148
+ ?. scrollTo ( { top : 0 , behavior : 'smooth' } ) ,
1149
+ 0
1150
+ ) ;
1151
+ } }
1152
+ >
1153
+ Genome View
1154
+ </ button >
1155
+ < button
1156
+ className = "navigation-button split-right"
1157
+ tabIndex = { 1 }
1158
+ data-bs-toggle = "modal"
1159
+ data-bs-target = "#genome-view-modal"
1160
+ >
1161
+ < svg className = "button question-mark" viewBox = { ICONS . QUESTION_CIRCLE_FILL . viewBox } >
1162
+ < title > Question Mark</ title >
1163
+ { ICONS . QUESTION_CIRCLE_FILL . path . map ( p => (
1164
+ < path fill = "currentColor" key = { p } d = { p } />
1165
+ ) ) }
1166
+ </ svg >
1167
+ </ button >
1211
1168
</ div >
1212
- ) : null }
1169
+ < div className = "navigation-button-container split navigation-button-variant" >
1170
+ < button
1171
+ className = "navigation-button split-left"
1172
+ tabIndex = { 1 }
1173
+ onClick = { ( ) => {
1174
+ setTimeout ( ( ) => {
1175
+ document . getElementById ( 'variant-view' ) ?. scrollIntoView ( {
1176
+ block : 'start' ,
1177
+ inline : 'nearest' ,
1178
+ behavior : 'smooth'
1179
+ } ) ,
1180
+ 0 ;
1181
+ } ) ;
1182
+ } }
1183
+ >
1184
+ Variant View
1185
+ </ button >
1186
+ < button
1187
+ className = "navigation-button split-right"
1188
+ tabIndex = { 1 }
1189
+ data-bs-toggle = "modal"
1190
+ data-bs-target = "#variant-view-modal"
1191
+ >
1192
+ < svg className = "button question-mark" viewBox = { ICONS . QUESTION_CIRCLE_FILL . viewBox } >
1193
+ < title > Question Mark</ title >
1194
+ { ICONS . QUESTION_CIRCLE_FILL . path . map ( p => (
1195
+ < path fill = "currentColor" key = { p } d = { p } />
1196
+ ) ) }
1197
+ </ svg >
1198
+ </ button >
1199
+ </ div >
1200
+ </ div >
1213
1201
{
1214
1202
// External links and export buttons
1215
1203
isMinimalMode ? (
0 commit comments