@@ -11,7 +11,6 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
1111 const [ currentPosition , setCurrentPosition ] = useState ( [ 0 , Number . MAX_SAFE_INTEGER ] ) ;
1212 const [ enableUpdate , setEnableUpdate ] = useState ( false ) ;
1313 const [ allowWiggleVisualization , setAllowWiggleVisualization ] = useState ( false ) ;
14- const [ zoomLevel , setZoomLevel ] = useState ( 1 ) ;
1514
1615
1716
@@ -21,7 +20,7 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
2120 if ( abs_diff < 5500 ) {
2221 setEnableUpdate ( true ) ;
2322 }
24- else {
23+ else {
2524 setEnableUpdate ( false ) ;
2625 setAllowWiggleVisualization ( false ) ;
2726 }
@@ -33,7 +32,7 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
3332
3433
3534 useEffect ( ( ) => {
36-
35+
3736 if ( gosRef . current ) {
3837 console . log ( gosRef . current . api . getViews ( ) )
3938
@@ -45,7 +44,7 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
4544 if ( Math . abs ( start - end ) < 10000 ) {
4645 updatePositionThrottled ( start , end ) ;
4746 }
48-
47+
4948 }
5049 } ) ;
5150 }
@@ -67,7 +66,7 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
6766 < div className = 'gosling-component' >
6867 < div className = 'genome-viewer-select' style = { { paddingBottom : "1.5em" } } >
6968 < SingleSelectDropdown
70- helpText = { `Two different views are available: Single View shows the genome viewer grouped vertically by Genome/Condition, while the Aligned View aligns the strands vertically and the genomes/conditions on each row.` }
69+ helpText = { `Two different views are available: Single View shows the genome viewer grouped vertically by Genome/Condition, while the Aligned View aligns the strands vertically and the genomes/conditions on each row.` }
7170
7271 label = "Change Genome Viewer Modus:"
7372 value = { currentType }
@@ -83,12 +82,12 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
8382 < label
8483 htmlFor = "wiggle-toggle"
8584 style = { {
86- textAlign : "center"
85+ textAlign : "center"
8786 } }
8887 data-title = {
8988 allowWiggleVisualization
90- ? "Coverage profile visualization enabled. This consumes more resources, please, disable if unnecessary."
91- : "You can enable it when zoomed in, but consider that this requires a stable high-sppeed internet connection."
89+ ? "The coverage profile visualization is enabled. As this consumes more resources, please, disable if unnecessary. It will be disabled automatically when zooming out ."
90+ : "The visualization of the coverage profile can be activated once you are reach the detailed view of the explorer (i.e. TSS are visualized individually). Consider that this requires a stable and high-speed internet connection for a smooth interaction ."
9291 }
9392 >
9493 < input
@@ -100,15 +99,15 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
10099 style = { {
101100 width : "1.1em" ,
102101 height : "1.1em" ,
103- cursor : "pointer" ,
102+ cursor : enableUpdate ? "pointer" : "not-allowed ",
104103 accentColor : "#ffa000" , // similar to your button color
105104 } }
106105 />
107106 < span >
108107 Enable read coverage visualization
109108 </ span >
110109 </ label >
111- </ div >
110+ </ div >
112111
113112 < div className = 'button-container' >
114113 < label htmlFor = "update-button" style = { { textAlign : "center" } }
@@ -135,34 +134,34 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
135134 </ div >
136135
137136 < div className = 'button-container' >
138- < button className = "button-results" style = {
139- {
140- backgroundColor : "#ffa000" ,
141- color : "white" ,
142- padding : "0.5em" ,
143- margin : "2px" ,
144- border : "none" ,
145- cursor : "pointer" ,
146- borderRadius : "6px" ,
147- fontFamily : "Arial" ,
148- maxWidth : "auto"
149- }
150- } onClick = { ( ) => {
137+ < button className = "button-results" style = {
138+ {
139+ backgroundColor : "#ffa000" ,
140+ color : "white" ,
141+ padding : "0.5em" ,
142+ margin : "2px" ,
143+ border : "none" ,
144+ cursor : "pointer" ,
145+ borderRadius : "6px" ,
146+ fontFamily : "Arial" ,
147+ maxWidth : "auto"
148+ }
149+ } onClick = { ( ) => {
151150 gosRef . current . api . exportPdf ( )
152151 } } > Export as PDF</ button >
153152 < button className = "button-results" style = {
154- {
155- backgroundColor : "#ffa000" ,
156- color : "white" ,
157- padding : "0.5em" ,
158- margin : "2px" ,
159- border : "none" ,
160- cursor : "pointer" ,
161- borderRadius : "6px" ,
162- fontFamily : "Arial" ,
163- maxWidth : "auto"
164- }
165- } onClick = { ( ) => {
153+ {
154+ backgroundColor : "#ffa000" ,
155+ color : "white" ,
156+ padding : "0.5em" ,
157+ margin : "2px" ,
158+ border : "none" ,
159+ cursor : "pointer" ,
160+ borderRadius : "6px" ,
161+ fontFamily : "Arial" ,
162+ maxWidth : "auto"
163+ }
164+ } onClick = { ( ) => {
166165 gosRef . current . api . exportPng ( )
167166 } } > Export as PNG</ button >
168167
@@ -179,21 +178,20 @@ function GenomeViewer({ filePath, dataGosling, filter, gosRef, widthTrack, nameG
179178 dataGosling = { dataGosling }
180179 filePath = { filePath }
181180 filter = { filter }
182- allowWiggleVisualization = { allowWiggleVisualization }
181+ allowWiggleVisualization = { allowWiggleVisualization }
183182 allowFetch = { enableUpdate }
184183 gosRef = { gosRef }
185184 widthTrack = { widthTrack }
186- zoomLevel = { zoomLevel }
187185 /> :
188186 < AlignedGenomeViz
189- maxValueWiggleDict = { maxValueWiggleDict }
190- dataGosling = { dataGosling }
191- filePath = { filePath }
192- allowFetch = { enableUpdate }
193- allowWiggleVisualization = { allowWiggleVisualization }
194- filter = { filter }
195- gosRef = { gosRef }
196- widthTrack = { widthTrack }
187+ maxValueWiggleDict = { maxValueWiggleDict }
188+ dataGosling = { dataGosling }
189+ filePath = { filePath }
190+ allowFetch = { enableUpdate }
191+ allowWiggleVisualization = { allowWiggleVisualization }
192+ filter = { filter }
193+ gosRef = { gosRef }
194+ widthTrack = { widthTrack }
197195
198196 />
199197
0 commit comments