fix some slider issues

This commit is contained in:
Stewart Allen 2020-11-09 00:21:35 -05:00
commit d6b06e8ac4
3 changed files with 7 additions and 7 deletions

View file

@ -686,8 +686,7 @@
API.conf.save();
API.event.emit('slice.begin', getMode());
let firstMesh = true,
countdown = WIDGETS.length,
let countdown = WIDGETS.length,
totalProgress,
track = {},
mode = settings.mode,
@ -720,11 +719,11 @@
if (lastMsg) segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime;
segtimes.total = UTIL.time() - now;
API.event.emit('slice', getMode());
firstMesh = false;
}
// on done
segtimes[`${segNumber}_draw`] = widget.render(stack);
updateSliderMax(true);
setVisibleLayer(-1, 0);
// clear wireframe
widget.setWireframe(false, color.wireframe, color.wireframe_opacity);
widget.setOpacity(camOrLaser ? color.cam_sliced_opacity : color.sliced_opacity);
@ -828,7 +827,7 @@
if (feature.preview) {
SPACE.update();
updateSliderMax(true);
showSlices();
setVisibleLayer(-1, 0);
}
if (typeof(callback) === 'function') {
@ -1929,7 +1928,7 @@
KIRI.work.clear();
STACKS.clear();
hideSlider();
setVisibleLayer(0,0);
setVisibleLayer();
setWidgetVisibility(true);
setOpacity(1);
break;

View file

@ -35,7 +35,7 @@
print.render = KIRI.driver.FDM.prepareRender(print.output, progress => {
update(0.5 + progress * 0.5);
}, { thin: true, print: 0, move: 0x003366 });
}, { thin: true, print: 0, move: 0x003366, speed: false });
return print.render;
};

View file

@ -385,6 +385,7 @@
const opts = options || {};
const tools = opts.tools || {};
const thin = opts.thin || false;
const ckspeed = opts.speed !== false;
const moveColor = opts.move >= 0 ? opts.move : 0xaaaaaa;
const printColor = opts.print >= 0 ? opts.print : 0x777700;
const layers = [];
@ -420,7 +421,7 @@
}
if (lastOut) {
if (out.emit) {
if (!lastOut.emit || out.speed !== lastOut.speed) {
if (!lastOut.emit || (ckspeed && out.speed !== lastOut.speed)) {
current = newPolygon().setOpen();
current.push(lastOut.point);
current.color = hsv2rgb({h:out.speed/maxspd, s:1, v:1}, true);