fix(svg): airdryer condition color
This commit is contained in:
@@ -95,22 +95,23 @@ const handleBoolean = (svg, el, value) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// balik arah khusus untuk airdryerA
|
||||
if (dryerIds.slice(0, 2).includes(el.id)) {
|
||||
value = !value;
|
||||
}
|
||||
|
||||
const i = dryerIds.indexOf(el.id);
|
||||
const id1 = dryerIds[i - (i % 2)];
|
||||
const id2 = dryerIds[i - (i % 2) + 1];
|
||||
|
||||
const el1 = svg.getElementById(id1);
|
||||
const el2 = svg.getElementById(id2);
|
||||
const els1 = svg.querySelectorAll(`#${id1}`);
|
||||
const els2 = svg.querySelectorAll(`#${id2}`);
|
||||
|
||||
if (!el1 || !el2) return;
|
||||
if (!els1 || !els2) return;
|
||||
// balik arah khusus untuk airdryerA
|
||||
if (dryerIds.slice(0, 2).includes(el.id)) value = !value;
|
||||
|
||||
el1.style.fill = value ? 'rgb(216,216,216)' : 'yellow';
|
||||
el2.style.fill = value ? 'yellow' : 'rgb(216,216,216)';
|
||||
els1.forEach(el => {
|
||||
el.style.fill = value ? 'rgb(255, 204, 63)' : 'rgb(216,216,216)';
|
||||
});
|
||||
els2.forEach(el => {
|
||||
el.style.fill = value ? 'rgb(216,216,216)' : 'rgb(255, 204, 63)';
|
||||
});
|
||||
};
|
||||
|
||||
const handleNumber = (el, value) => {
|
||||
|
||||
Reference in New Issue
Block a user