@@ -176,10 +176,10 @@ textRenderer: window.lcjsSmallView ? lcjs.htmlTextRenderer : undefined,
176176 . setCellContent ( gridColMarketCap , 0 , 'Market Cap' )
177177 . setCellContent ( gridColVolume , 0 , 'Volume' )
178178 . setCellContent ( gridColAllTimeHigh , 0 , 'All-time High' )
179- . setColumnWidth ( gridColHighlight , 6 )
180- . setColumnWidth ( gridCol1h , 100 )
181- . setColumnWidth ( gridCol24h , 100 )
182- . setColumnWidth ( gridCol1w , 100 )
179+ . setColumnWidth ( gridColHighlight , smallView ? 4 : 6 )
180+ . setColumnWidth ( gridCol1h , smallView ? 55 : 100 )
181+ . setColumnWidth ( gridCol24h , smallView ? 55 : 100 )
182+ . setColumnWidth ( gridCol1w , smallView ? 55 : 100 )
183183 . setRowTextFont ( 0 , fontHeader )
184184 . setRowBorders ( 0 , { bottom : true } )
185185 . setRowTextFillStyle ( 0 , textFillHeader )
@@ -202,15 +202,15 @@ textRenderer: window.lcjsSmallView ? lcjs.htmlTextRenderer : undefined,
202202 const coinIconImage = new Image ( )
203203 coinIconImage . crossOrigin = '*'
204204 coinIconImage . src = coinIconUrl
205- const icon = dataGrid . engine . addCustomIcon ( coinIconImage , { height : 32 } )
205+ const icon = dataGrid . engine . addCustomIcon ( coinIconImage , { height : smallView ? 18 : 32 } )
206206
207207 const dataGlance1h = calcDataAtAGlance ( coinData , tNow - 1 * 60 * 60 * 1000 , tNow )
208208 const dataGlance24h = calcDataAtAGlance ( coinData , tNow - 24 * 60 * 60 * 1000 , tNow )
209209 const dataGlance1w = calcDataAtAGlance ( coinData , tNow - 7 * 24 * 60 * 60 * 1000 , tNow )
210210
211211 dataGrid
212- . setRowHeight ( coinRowTop , 30 )
213- . setRowHeight ( coinRowBottom , 30 )
212+ . setRowHeight ( coinRowTop , smallView ? 18 : 30 )
213+ . setRowHeight ( coinRowBottom , smallView ? 18 : 30 )
214214 // NOTE: First column just used for highlighting active row.
215215 . setCellContent ( gridColHighlight , coinRowTop , 1 , 2 , ' ' )
216216 . setCellContent ( gridColCoin , coinRowTop , 1 , 2 , icon )
0 commit comments