Add File System in settings and disable peek if not expandeed

index.htm and index.js and peek.js:
- add expand and peek function for peek expand to removeEventListener if not expanded

- add peekexp and segvexp in settings to save status (wip)

- add File System in settings
This commit is contained in:
Ewoud
2023-03-17 23:53:27 +01:00
parent 5ac9ffa073
commit aa6b1735d3
9 changed files with 2460 additions and 2429 deletions

View File

@@ -25,7 +25,7 @@ var ws, cpick, ranges;
var cfg = {
theme:{base:"dark", bg:{url:""}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}},
comp :{colors:{picker: true, rgb: false, quick: true, hex: false},
labels:true, pcmbot:false, pid:true, seglen:false, segpwr:false, segexp:true, css:true, hdays:false} //WLEDMM segexp true as default
labels:true, pcmbot:false, pid:true, seglen:false, segpwr:false, segexp:true, peekexp:true, segvexp: true, css:true, hdays:false} //WLEDMM segexp true as default, add peekexp and segvexp
};
var hol = [
[0,11,24,4,"https://aircoookie.github.io/xmas.png"], // christmas
@@ -1157,6 +1157,13 @@ function updateLen(s, draw=true) //WLEDMM conditonally draw segment view
gId("segviews").style.display = isM? "inline":"none";
}
//WLEDMM
function eandp(o,i)
{
expandV(o,i);
peek(i, i.style.display =="none");
}
//WLEDMM
function expandV(o,i)
{
@@ -1301,7 +1308,7 @@ function drawSegmentView() {
} // for each segment
gId("MD").innerHTML = "W*H=LC: " + maxWidth + " x " + maxHeight + " = " + maxWidth * maxHeight;
gId("MD").innerHTML = "W*H=LC: " + maxWidth + " x " + maxHeight + " = " + maxWidth * maxHeight;
function post() {
for (let p=0; p<gId("segcont").children.length; p++) {