Merge pull request #3466 from WoodyLetsCode/fix-effect-jumping
Fix jumping of selected effect on refresh
This commit is contained in:
commit
3eabefd3d6
@ -1513,12 +1513,15 @@ function setEffectParameters(idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set the bottom position of selected effect (sticky) as the top of sliders div
|
// set the bottom position of selected effect (sticky) as the top of sliders div
|
||||||
setInterval(()=>{
|
function setSelectedEffectPosition() {
|
||||||
let top = parseInt(getComputedStyle(gId("sliders")).height);
|
let top = parseInt(getComputedStyle(gId("sliders")).height);
|
||||||
top += 5;
|
top += 5;
|
||||||
let sel = d.querySelector('#fxlist .selected');
|
let sel = d.querySelector('#fxlist .selected');
|
||||||
if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setFX())
|
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
|
// set html color items on/off
|
||||||
var cslLabel = '';
|
var cslLabel = '';
|
||||||
var sep = '';
|
var sep = '';
|
||||||
|
1977
wled00/html_ui.h
1977
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user