fix odd layer offset from floating point imprecision

This commit is contained in:
Stewart Allen 2021-05-28 11:19:33 -04:00
commit b333779773

View file

@ -325,7 +325,7 @@
}
for (let slice of widget.slices) {
slice.widget = widget;
let z = slice.z + widget.offset.z;
let z = (slice.z + widget.offset.z).round(2);
let rec = zrec[z] = zrec[z] || {z, slices:[]};
if (rec.slices.length === 0) {
cake.push(rec);