add feature that allows disabling preview (for simplyprint)
This commit is contained in:
parent
d54a6da12d
commit
5e4b738116
1 changed files with 17 additions and 10 deletions
|
|
@ -72,7 +72,8 @@
|
||||||
const feature = {
|
const feature = {
|
||||||
seed: true,
|
seed: true,
|
||||||
controls: true,
|
controls: true,
|
||||||
drop_group: undefined
|
drop_group: undefined,
|
||||||
|
preview: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const selection = {
|
const selection = {
|
||||||
|
|
@ -723,8 +724,10 @@
|
||||||
|
|
||||||
let isCam = MODE === MODES.CAM, pMode = getMode();
|
let isCam = MODE === MODES.CAM, pMode = getMode();
|
||||||
|
|
||||||
setViewMode(VIEWS.PREVIEW);
|
if (feature.preview) {
|
||||||
clearPrint();
|
setViewMode(VIEWS.PREVIEW);
|
||||||
|
clearPrint();
|
||||||
|
}
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
API.event.emit('preview.begin', pMode);
|
API.event.emit('preview.begin', pMode);
|
||||||
|
|
||||||
|
|
@ -733,7 +736,7 @@
|
||||||
forAllWidgets(function(widget) {
|
forAllWidgets(function(widget) {
|
||||||
widget.setColor(color.cam_preview);
|
widget.setColor(color.cam_preview);
|
||||||
});
|
});
|
||||||
} else {
|
} else if (feature.preview) {
|
||||||
setOpacity(color.preview_opacity);
|
setOpacity(color.preview_opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -748,16 +751,20 @@
|
||||||
API.show.progress(0);
|
API.show.progress(0);
|
||||||
if (!isCam) setOpacity(0);
|
if (!isCam) setOpacity(0);
|
||||||
|
|
||||||
currentPrint.render();
|
if (feature.preview) {
|
||||||
|
currentPrint.render();
|
||||||
|
}
|
||||||
|
|
||||||
API.event.emit('print', pMode);
|
API.event.emit('print', pMode);
|
||||||
API.event.emit('preview.end', pMode);
|
API.event.emit('preview.end', pMode);
|
||||||
SPACE.platform.add(currentPrint.group);
|
|
||||||
SPACE.update();
|
|
||||||
|
|
||||||
UI.layerPrint.checked = true;
|
if (feature.preview) {
|
||||||
updateSliderMax(true);
|
SPACE.platform.add(currentPrint.group);
|
||||||
showSlices();
|
SPACE.update();
|
||||||
|
UI.layerPrint.checked = true;
|
||||||
|
updateSliderMax(true);
|
||||||
|
showSlices();
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(callback) === 'function') {
|
if (typeof(callback) === 'function') {
|
||||||
callback();
|
callback();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue