Skip to content

Commit

Permalink
fix: update current active element's highlight color or fill on color…
Browse files Browse the repository at this point in the history
… change (#538)
  • Loading branch information
krishnanand5 authored Aug 29, 2024
1 parent e28d9f7 commit d001287
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,24 @@ class Menu {
.setAttribute('aria-live', constants.ariaMode);

document.getElementById('init_llm_on_load').checked = constants.autoInitLLM;
const scatter = document.getElementsByClassName('highlight_point');
const heatmap = document.getElementById('highlight_rect');
const line = document.getElementById('highlight_point');

if (scatter !== null && scatter.length > 0) {
for (let i = 0; i < scatter.length; i++) {
scatter[i].setAttribute('stroke', constants.colorSelected);
scatter[i].setAttribute('fill', constants.colorSelected);
}
}

if (heatmap !== null) {
heatmap.setAttribute('stroke', constants.colorSelected);
}

if (line !== null) {
line.setAttribute('stroke', constants.colorSelected);
}
}

/**
Expand Down

0 comments on commit d001287

Please sign in to comment.