From 932b3df81d99161901a76a0d9f1ca9530fb64183 Mon Sep 17 00:00:00 2001 From: james hadfield Date: Wed, 13 Nov 2024 12:29:23 +1300 Subject: [PATCH] Bugfix in Entropy panel when window resizes The bug arose because window-resizes trigger a complete re-render of the entropy panel's SVG and this didn't correctly handle an edge case where the entropy data was stale (a concept introduced in #1879). For specific steps to reproduce see Closes #1895 --- src/components/entropy/entropyD3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/entropy/entropyD3.js b/src/components/entropy/entropyD3.js index e02b1aae3..2cc3f7f35 100644 --- a/src/components/entropy/entropyD3.js +++ b/src/components/entropy/entropyD3.js @@ -190,7 +190,7 @@ EntropyChart.prototype._setZoomCoordinates = function _setZoomCoordinates(overri EntropyChart.prototype._setSelectedNodes = function _setSelectedNodes() { this.selectedNodes = []; - if (!this.selectedPositions.length) return; + if (!this.selectedPositions.length || !this.bars) return; if (this.aa) { /* P R O T E I N S */ for (const node of this.bars) { for (const position of this.selectedPositions) {