From 4287adb7eb5930a9d6e3e1790368bb7a3c404b54 Mon Sep 17 00:00:00 2001 From: Colin Diesh Date: Thu, 14 Mar 2024 13:16:15 -0400 Subject: [PATCH] Fix alignment curves showing up in inkscape for breakpoint svg (#4293) --- .../components/AlignmentConnections.tsx | 10 +++------- .../breakpoint_split_view_snapshot.svg | 2 +- .../__snapshots__/BreakpointSplitView.test.tsx.snap | 3 ++- .../ExportSvgBreakpointSplitView.test.tsx.snap | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/plugins/breakpoint-split-view/src/BreakpointSplitView/components/AlignmentConnections.tsx b/plugins/breakpoint-split-view/src/BreakpointSplitView/components/AlignmentConnections.tsx index 4994f57c42..787316acab 100644 --- a/plugins/breakpoint-split-view/src/BreakpointSplitView/components/AlignmentConnections.tsx +++ b/plugins/breakpoint-split-view/src/BreakpointSplitView/components/AlignmentConnections.tsx @@ -59,13 +59,8 @@ const AlignmentConnections = observer(function ({ yOffset = rect.top } - if (!assembly) { - return null - } - - return ( + return assembly ? ( @@ -133,6 +128,7 @@ const AlignmentConnections = observer(function ({ { @@ -160,7 +156,7 @@ const AlignmentConnections = observer(function ({ return ret })} - ) + ) : null }) export default AlignmentConnections diff --git a/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg b/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg index c825f7c5b8..6466ca42d0 100644 --- a/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg +++ b/products/jbrowse-web/src/tests/__image_snapshots__/breakpoint_split_view_snapshot.svg @@ -1 +1 @@ -hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds \ No newline at end of file +hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds \ No newline at end of file diff --git a/products/jbrowse-web/src/tests/__snapshots__/BreakpointSplitView.test.tsx.snap b/products/jbrowse-web/src/tests/__snapshots__/BreakpointSplitView.test.tsx.snap index ca234a5f21..db7c352ce4 100644 --- a/products/jbrowse-web/src/tests/__snapshots__/BreakpointSplitView.test.tsx.snap +++ b/products/jbrowse-web/src/tests/__snapshots__/BreakpointSplitView.test.tsx.snap @@ -4,16 +4,17 @@ exports[`breakpoint split view 1`] = ` diff --git a/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap b/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap index b0e858bda7..0d8a41a9c5 100644 --- a/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap +++ b/products/jbrowse-web/src/tests/__snapshots__/ExportSvgBreakpointSplitView.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`export svg of breakpoint split view 1`] = `"hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds"`; +exports[`export svg of breakpoint split view 1`] = `"hg19chr3186,698,000186,700,000chr3186,702,000186,704,0000077HG002.hs37d5.11kbpbsv.BND.3:186700648-6:56758392T[6:56758392[pbsv.BND.3:186700648-6:56758392T[6:56758392[HG002.hs37d5.bndshg19chr656,754,00056,756,00056,758,000chr656,758,00056,760,00056,762,0000088HG002.hs37d5.11kbpbsv.BND.6:56758392-3:186700648]3:186700648]Tpbsv.BND.6:56758392-3:186700648]3:186700648]THG002.hs37d5.bnds"`;