stub in checkbox coloring

This commit is contained in:
Stewart Allen 2020-12-30 11:38:01 -05:00
commit 290ace6f7f
3 changed files with 9 additions and 2 deletions

View file

@ -47,6 +47,7 @@
paths: [],
cpath: undefined, // path colors indices
color: colors || {
check: 0,
line: 0,
face: 0,
opacity: 1

View file

@ -60,10 +60,11 @@
layers: [ ],
obj: new KIRI.Stack(view, freeMem),
add: function(layers) {
let lmap = layers.layers;
let map = stack.obj.addLayers(layers);
for (const [label, mats] of Object.entries(map)) {
if (!DYN[label]) {
DYN[label] = {
let check = DYN[label] = {
group: [],
toggle: UC.newBoolean(label, (abc) => {
ctrl.group.forEach(mat => {
@ -71,6 +72,11 @@
});
})
};
// let color = lmap[label].color.check;
// if (color !== undefined) {
// console.log({check, color});
// check.toggle.style.color = "#f00";
// }
}
const ctrl = DYN[label];
ctrl.group.appendAll(mats);