Comment fix.

This commit is contained in:
Blaz Kristan 2022-03-09 18:21:52 +01:00
parent 261260b232
commit d8d9259c36
4 changed files with 1710 additions and 1737 deletions

View File

@ -528,7 +528,6 @@ img {
height: 28px;
top: 0; bottom: 0;
left: 0; right: 0;
/*border: 1px solid var(--c-b);*/
}
#rwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #f00); }
#gwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #0f0); }
@ -557,6 +556,7 @@ output.sliderbubbleshow {
opacity: 1;
}
/* wrapper divs hidden by default */
#rgbwrap, #kwrap, #wwrap, #wbal, #qcs-w, #hexw {
display: none;
}
@ -690,6 +690,8 @@ input[type=range]::-moz-range-thumb {
margin: 0;
white-space: nowrap;
}
/* Quick color select wrapper div */
#qcs-w {
margin-top: 10px;
}
@ -813,15 +815,7 @@ input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
/*
.segntxt {
max-width: 160px;
overflow: hidden;
text-overflow: clip;
}
*/
.segname, .pname {
/*padding: 4px 0;*/
white-space: nowrap;
cursor: pointer;
text-align: center;
@ -1040,7 +1034,6 @@ input[type=number]::-webkit-outer-spin-button {
background-color: var(--c-2);
overflow: hidden;
position: sticky;
/*border: 1px solid var(--c-2);*/
border-radius: 24px;
margin: 10px auto 0;
min-height: 24px;
@ -1054,7 +1047,6 @@ input[type=number]::-webkit-outer-spin-button {
#pcont .pres:hover:not([class*="expanded"]),
#pcont .selected:hover:not([class*="expanded"]),
.lstI:hover {
/*border: 1px solid var(--c-5);*/
background: var(--c-5);
}
@ -1105,15 +1097,14 @@ input[type=number]::-webkit-outer-spin-button {
white-space: nowrap;
}
/* palette preview */
.lstIprev {
/*
width: 100%;
height: 7px;
position: absolute;
bottom: 0;
left: 0;
z-index: -1;
*/
}
.fnd {
@ -1130,7 +1121,6 @@ input[type="text"].fnd {
text-align: left;
border-radius: 25px;
background: var(--c-2);
/*border: 1px solid var(--c-3);*/
}
input[type="text"].fnd:focus {

View File

@ -168,27 +168,14 @@
<i class="icons search-icon">&#xe0a1;</i>
</div>
<div id="pallist" class="list">
<!--div class="lstIprev">
<div class="lstI" data-id="0">
<label class="radio schkl">
<input type="radio" value="0" name="palette" onChange="setPalette()" checked>
<span class="radiomark schk"></span>
</label>
<div class="lstIcontent">
<span class="lstIname">
Default
</span>
</div>
</div>
</div-->
<div class="lstIprev">
<div class="lstI">
<label class="radio schkl" onclick="loadPalettes()">
<div class="lstIcontent">
<span class="lstIname">
Loading...
</span>
</div>
</div>
</label>
</div>
</div>
</div>

View File

@ -1096,7 +1096,6 @@ function cmpP(a, b)
}
function makeWS() {
//if (ws) { ws.close(); ws=null; }
if (ws || lastinfo.ws < 0) return;
ws = new WebSocket((window.location.protocol == "https:"?"wss":"ws")+'://'+(loc?locip:window.location.hostname)+'/ws');
ws.binaryType = "arraybuffer";
@ -1169,7 +1168,6 @@ function readState(s,command=false)
hasWhite |= !!(lc & 0x08); // & 0x02 contains W channel
hasCCT |= !!(lc & 0x04);
}
//if(s.seg[i].sel) {selc = ind; break;} ind++;
}
var i=s.seg[selc];
if (sellvl == 1) {
@ -1190,7 +1188,6 @@ function readState(s,command=false)
cd[e].dataset.g = i.col[e][1];
cd[e].dataset.b = i.col[e][2];
if (hasWhite) { let w = cd[e].dataset.w = i.col[e][3]; }
//cd[e].style.backgroundColor = rgbStr(cd[e].dataset); // or:
setCSL(cd[e]);
}
selectSlot(csel);
@ -1485,7 +1482,7 @@ function toggleInfo()
{
if (isNodes) toggleNodes();
isInfo = !isInfo;
if (isInfo) requestJson(); // loadInfo();
if (isInfo) requestJson();
gId('info').style.transform = (isInfo) ? "translateY(0px)":"translateY(100%)";
gId('buttonI').className = (isInfo) ? "active":"";
}
@ -2045,7 +2042,6 @@ function selectSlot(b)
gId('sliderW').value = parseInt(cd[b].dataset.w);
//updateTrail(gId('sliderW'));
redrawPalPrev();
//updatePSliders();
}
// set the color from a hex string. Used by quick color selectors
@ -2086,8 +2082,6 @@ function updatePSliders() {
var c = iro.Color.hsvToRgb(hsv);
var cs = 'rgb('+c.r+','+c.g+','+c.b+')';
v.nextElementSibling.style.backgroundImage = `linear-gradient(90deg, #000 0%, ${cs})`;
//v.parentNode.getElementsByClassName('sliderdisplay')[0].style.setProperty('--bg',cs);
//updateTrail(v);
// update Kelvin slider
gId('sliderK').value = cpick.color.kelvin;
@ -2147,7 +2141,6 @@ function fromRgb()
function fromW()
{
let w = gId('sliderW');
//updateTrail(w);
let cd = gId('csl').children; // color slots
cd[csel].dataset.w = w.value;
setCSL(cd[csel]);
@ -2166,7 +2159,6 @@ function setColor(sr)
cdd.g = g = hasRGB ? col.g : w;
cdd.b = b = hasRGB ? col.b : w;
cdd.w = w;
//cd[csel].style.backgroundColor = rgbStr(cd[csel].dataset); // or:
setCSL(cd[csel]);
var obj = {"seg": {"col": [[r, g, b, w],[],[]]}};
if (csel == 1) {
@ -2235,7 +2227,7 @@ function loadPalettesData(callback = null)
var d = JSON.parse(lsPalData);
if (d && d.vid == d.vid) {
palettesData = d.p;
if (callback) callback(); // redrawPalPrev()
if (callback) callback(); // actually redrawPalPrev()
return;
}
} catch (e) {}
@ -2247,7 +2239,7 @@ function loadPalettesData(callback = null)
p: palettesData,
vid: lastinfo.vid
}));
if (callback) setTimeout(callback, 99); //redrawPalPrev()
if (callback) setTimeout(callback, 99); // actually redrawPalPrev()
});
}

File diff suppressed because it is too large Load Diff