Bugfix for white value.

This commit is contained in:
Blaz Kristan 2021-10-22 07:21:47 +02:00
parent 39b7b3ad53
commit 0d77027f60
3 changed files with 2198 additions and 2179 deletions

View File

@ -1554,11 +1554,6 @@ function setSegBri(s){
requestJson(obj); requestJson(obj);
} }
function setBalance(b)
{
var obj = {"seg": {"cct": parseInt(b)}};
requestJson(obj);
}
function setX(ind = null) { function setX(ind = null) {
if (ind === null) { if (ind === null) {
ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value); ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value);
@ -1792,7 +1787,7 @@ function setColor(sr) {
var cd = d.getElementById('csl').children; var cd = d.getElementById('csl').children;
if (sr == 1 && cd[csel].style.backgroundColor == 'rgb(0, 0, 0)') cpick.color.setChannel('hsv', 'v', 100); if (sr == 1 && cd[csel].style.backgroundColor == 'rgb(0, 0, 0)') cpick.color.setChannel('hsv', 'v', 100);
cd[csel].style.backgroundColor = cpick.color.rgbString; cd[csel].style.backgroundColor = cpick.color.rgbString;
if (sr != 2) whites[csel] = d.getElementById('sliderW').value; if (sr != 2) whites[csel] = parseInt(d.getElementById('sliderW').value);
var col = cpick.color.rgb; var col = cpick.color.rgb;
var obj = {"seg": {"col": [[col.r, col.g, col.b, whites[csel]],[],[]]}}; var obj = {"seg": {"col": [[col.r, col.g, col.b, whites[csel]],[],[]]}};
if (csel == 1) { if (csel == 1) {
@ -1805,6 +1800,12 @@ function setColor(sr) {
requestJson(obj); requestJson(obj);
} }
function setBalance(b)
{
var obj = {"seg": {"cct": parseInt(b)}};
requestJson(obj);
}
var hc = 0; var hc = 0;
setInterval(function(){if (!isInfo) return; hc+=18; if (hc>300) hc=0; if (hc>200)hc=306; if (hc==144) hc+=36; if (hc==108) hc+=18; setInterval(function(){if (!isInfo) return; hc+=18; if (hc>300) hc=0; if (hc>200)hc=306; if (hc==144) hc+=36; if (hc==108) hc+=18;
d.getElementById('heart').style.color = `hsl(${hc}, 100%, 50%)`;}, 910); d.getElementById('heart').style.color = `hsl(${hc}, 100%, 50%)`;}, 910);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff