Skip to content

Commit 079cba6

Browse files
committed
Multibigwig
1 parent 991a348 commit 079cba6

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

plugins/wiggle/src/MultiLinearWiggleDisplay/components/LegendItem.tsx

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,23 @@ const LegendItem = function ({
1818
model: WiggleDisplayModel
1919
exportSVG?: boolean
2020
}) {
21-
const boxHeight = Math.min(20, rowHeight)
21+
const boxHeight = rowHeight //Math.min(20, rowHeight)
2222
const {
2323
needsCustomLegend,
2424
graphType,
2525
needsFullHeightScalebar,
2626
rowHeightTooSmallForScalebar,
2727
renderColorBoxes,
2828
} = model
29-
const svgFontSize = Math.min(rowHeight, 12)
30-
const canDisplayLabel = rowHeight > 11
29+
const svgFontSize = rowHeight
30+
const canDisplayLabel = rowHeight >= 6
3131
const colorBoxWidth = renderColorBoxes ? 15 : 0
3232
const legendWidth = labelWidth + colorBoxWidth + 5
3333
const svgOffset = exportSVG ? 10 : 0
3434
const extraOffset =
3535
svgOffset || (graphType && !rowHeightTooSmallForScalebar ? 50 : 0)
3636
return (
3737
<>
38-
{needsFullHeightScalebar ? null : (
39-
<RectBg
40-
y={idx * rowHeight + 1}
41-
x={extraOffset}
42-
width={legendWidth}
43-
height={boxHeight}
44-
/>
45-
)}
46-
{source.color ? (
47-
<RectBg
48-
y={idx * rowHeight + 1}
49-
x={extraOffset}
50-
width={colorBoxWidth}
51-
height={needsCustomLegend ? rowHeight : boxHeight}
52-
color={source.color}
53-
/>
54-
) : null}
5538
{canDisplayLabel ? (
5639
<text
5740
y={idx * rowHeight + 13}

plugins/wiggle/src/MultiLinearWiggleDisplay/model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ export function stateModelFactory(
377377
})
378378
.views(self => ({
379379
get legendFontSize() {
380-
return Math.min(self.rowHeight, 12)
380+
return Math.min(self.rowHeight, 8)
381381
},
382382

383383
get canDisplayLegendLabels() {
384-
return self.rowHeight > 11
384+
return self.rowHeight > 7
385385
},
386386

387387
get labelWidth() {

0 commit comments

Comments
 (0)