From 4af106a5a2455d410cab4722d7bf510645afcbcd Mon Sep 17 00:00:00 2001 From: Colin Diesh Date: Thu, 19 Dec 2024 00:01:16 -0500 Subject: [PATCH] Fix persisting alignments "color by" and "filter by" settings in snapshots/session shares/page reloads (#4732) --- .../LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts b/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts index 2c3f08d34a..29768f80a0 100644 --- a/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts +++ b/plugins/alignments/src/LinearPileupDisplay/SharedLinearPileupDisplayMixin.ts @@ -676,11 +676,12 @@ export function SharedLinearPileupDisplayMixin( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (snap) { // @ts-expect-error - const { colorBy, filterBy, ...rest } = snap + const { colorBy, colorBySetting, filterBySetting, filterBy, ...rest } = + snap return { ...rest, - filterBySetting: filterBy, - colorBySetting: colorBy, + filterBySetting: filterBySetting || filterBy, + colorBySetting: colorBySetting || colorBy, } } return snap