Skip to content

Commit

Permalink
Bugfix in Entropy panel when window resizes
Browse files Browse the repository at this point in the history
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 <#1895 (comment)>

Closes #1895
  • Loading branch information
jameshadfield committed Nov 12, 2024
1 parent 1cf70f8 commit 932b3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/entropy/entropyD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 932b3df

Please sign in to comment.