Skip to content

Commit

Permalink
Merge pull request #3466 from WoodyLetsCode/fix-effect-jumping
Browse files Browse the repository at this point in the history
Fix jumping of selected effect on refresh
  • Loading branch information
blazoncek committed Oct 22, 2023
2 parents fe717da + 7ff6a6e commit 3eabefd
Show file tree
Hide file tree
Showing 2 changed files with 994 additions and 990 deletions.
7 changes: 5 additions & 2 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1513,12 +1513,15 @@ function setEffectParameters(idx)
}

// set the bottom position of selected effect (sticky) as the top of sliders div
setInterval(()=>{
function setSelectedEffectPosition() {
let top = parseInt(getComputedStyle(gId("sliders")).height);
top += 5;
let sel = d.querySelector('#fxlist .selected');
if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setFX())
},750);
}

setSelectedEffectPosition();
setInterval(setSelectedEffectPosition,750);
// set html color items on/off
var cslLabel = '';
var sep = '';
Expand Down
Loading

0 comments on commit 3eabefd

Please sign in to comment.