From bb54ed5cd570d019949537b6c5e13a5bb035b2c1 Mon Sep 17 00:00:00 2001 From: Caroline Bridge <83305007+carolinebridge@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:20:24 -0400 Subject: [PATCH] Changes default height for SVG rendering to maxHeight to fix blank track effect on slow CPU (#4480) --- .../src/SvgFeatureRenderer/components/SvgFeatureRendering.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/svg/src/SvgFeatureRenderer/components/SvgFeatureRendering.tsx b/plugins/svg/src/SvgFeatureRenderer/components/SvgFeatureRendering.tsx index 93785736d8..66ab35ed26 100644 --- a/plugins/svg/src/SvgFeatureRenderer/components/SvgFeatureRendering.tsx +++ b/plugins/svg/src/SvgFeatureRenderer/components/SvgFeatureRendering.tsx @@ -241,10 +241,11 @@ const SvgFeatureRendering = observer(function SvgFeatureRendering(props: { const [region] = regions const width = (region.end - region.start) / bpPerPx const displayMode = readConfObject(config, 'displayMode') as string + const maxConfHeight = readConfObject(config, 'maxHeight') as number const ref = useRef(null) const [mouseIsDown, setMouseIsDown] = useState(false) - const [height, setHeight] = useState(0) + const [height, setHeight] = useState(maxConfHeight) const [movedDuringLastMouseDown, setMovedDuringLastMouseDown] = useState(false)