fix colors when switching line moved

This commit is contained in:
Stewart Allen 2020-11-12 22:21:24 -05:00
commit 268a470a4f

View file

@ -22,7 +22,8 @@
fill: { face: 0x0077bb, line: 0x0077bb, opacity: 1 }, fill: { face: 0x0077bb, line: 0x0077bb, opacity: 1 },
infill: { face: 0x0077bb, line: 0x0077bb, opacity: 1 }, infill: { face: 0x0077bb, line: 0x0077bb, opacity: 1 },
support: { face: 0x006699, line: 0x006699, opacity: 1 } support: { face: 0x006699, line: 0x006699, opacity: 1 }
}; },
PROTO = Object.clone(COLOR);
let isThin = false; // force line rendering let isThin = false; // force line rendering
let isFlat = false; // force flat rendering let isFlat = false; // force flat rendering
@ -85,10 +86,12 @@
color.opacity = 0.5; color.opacity = 0.5;
}); });
} else { } else {
Object.values(COLOR).forEach(color => { Object.keys(COLOR).forEach(key => {
color.flat = false; const color = COLOR[key];
color.line = 1 const proto = PROTO[key]
color.opacity = 1; color.flat = proto.flat;
color.line = proto.line;
color.opacity = proto.opacity;
}); });
} }