From f6b6207d3622bad54bc176c49e8b1c82fb6aefca Mon Sep 17 00:00:00 2001 From: Douglass Turner Date: Tue, 10 Oct 2023 09:34:58 -0400 Subject: [PATCH] Multi select bug fix. (#1710) --- .../multi-select-examples.html} | 0 dev/multi-select/multi-select.html | 2 +- js/ui/multiTrackSelectButton.js | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) rename dev/{misc/multi-select.html => multi-select/multi-select-examples.html} (100%) diff --git a/dev/misc/multi-select.html b/dev/multi-select/multi-select-examples.html similarity index 100% rename from dev/misc/multi-select.html rename to dev/multi-select/multi-select-examples.html diff --git a/dev/multi-select/multi-select.html b/dev/multi-select/multi-select.html index 2b310c67e..dc77bde30 100644 --- a/dev/multi-select/multi-select.html +++ b/dev/multi-select/multi-select.html @@ -288,7 +288,7 @@

Multiple Track Selection

] } - igv.createBrowser(document.getElementById("igvDiv"), kitchenSinkConfig) + igv.createBrowser(document.getElementById("igvDiv"), config) .then(function (browser) { console.log("Created IGV browser"); }) diff --git a/js/ui/multiTrackSelectButton.js b/js/ui/multiTrackSelectButton.js index 0d8b1c6fc..4307a3907 100644 --- a/js/ui/multiTrackSelectButton.js +++ b/js/ui/multiTrackSelectButton.js @@ -55,6 +55,8 @@ function setMultiTrackSelectionState(trackView, axis, doEnableMultiSelection) { container.style.display = 'grid' } else { + const trackSelectInput = container.querySelector('[name=track-select]') + if (trackView.dragHandle) { setDragHandleSelectionState(trackView, trackView.dragHandle, trackSelectInput.checked) } @@ -63,7 +65,6 @@ function setMultiTrackSelectionState(trackView, axis, doEnableMultiSelection) { trackView.track.autoscaleGroup = undefined } - const trackSelectInput = container.querySelector('[name=track-select]') trackSelectInput.checked = false container.style.display = 'none'