add widget hiding option in cam preview. change move color for better contrast
This commit is contained in:
parent
ba20158461
commit
e001ab4505
6 changed files with 34 additions and 4 deletions
|
|
@ -1578,7 +1578,8 @@
|
|||
layerDelta: UC.newBoolean(LANG.la_dlta, onLayerToggle, {modes:FDM}),
|
||||
layerSolid: UC.newBoolean(LANG.la_slds, onLayerToggle, {modes:FDM}),
|
||||
layerPrint: UC.newBoolean(LANG.la_prnt, onLayerToggle, {modes:GCODE}),
|
||||
layerMoves: UC.newBoolean(LANG.la_move, onLayerToggle, {modes:GCODE})
|
||||
layerMoves: UC.newBoolean(LANG.la_move, onLayerToggle, {modes:GCODE}),
|
||||
layerParts: UC.newBoolean(LANG.la_part, onLayerToggle, {modes:CAM})
|
||||
});
|
||||
|
||||
function showLaserKnife() {
|
||||
|
|
|
|||
|
|
@ -593,6 +593,19 @@
|
|||
return showing;
|
||||
}
|
||||
|
||||
function setWidgetVisibility(bool) {
|
||||
if (bool) {
|
||||
UI.layerParts.checked = true;
|
||||
}
|
||||
forAllWidgets(w => {
|
||||
if (bool) {
|
||||
w.show();
|
||||
} else {
|
||||
w.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* hide or show slice-layers and their sub-elements
|
||||
*
|
||||
|
|
@ -603,6 +616,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (MODE === MODES.CAM) {
|
||||
setWidgetVisibility(UI.layerParts.checked);
|
||||
}
|
||||
|
||||
showSlider();
|
||||
|
||||
if (typeof(layer) === 'string' || typeof(layer) === 'number') {
|
||||
|
|
@ -1997,13 +2014,16 @@
|
|||
hideSlider();
|
||||
clearWidgetCache();
|
||||
updateSliderMax();
|
||||
setWidgetVisibility(true);
|
||||
break;
|
||||
case VIEWS.SLICE:
|
||||
$('lt-back').style.display = 'flex';
|
||||
updateSliderMax();
|
||||
setWidgetVisibility(true);
|
||||
break;
|
||||
case VIEWS.PREVIEW:
|
||||
$('lt-back').style.display = 'flex';
|
||||
$('lt-back').style.display = 'flex';
|
||||
setWidgetVisibility(true);
|
||||
break;
|
||||
default:
|
||||
DBUG.log("invalid view mode: "+mode);
|
||||
|
|
|
|||
|
|
@ -758,4 +758,12 @@
|
|||
}
|
||||
};
|
||||
|
||||
PRO.show = function() {
|
||||
this.mesh.visible = true;
|
||||
};
|
||||
|
||||
PRO.hide = function() {
|
||||
this.mesh.visible = false;
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -2101,7 +2101,7 @@
|
|||
};
|
||||
|
||||
function printRender(print) {
|
||||
return KIRI.driver.FDM.printRender(print, {aslines: true, color: 0x010101});
|
||||
return KIRI.driver.FDM.printRender(print, {aslines: true, color: 0x010101, move_color: 0xcc3333});
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -1352,7 +1352,7 @@
|
|||
emits = KIRI.newLayer(scope.group);
|
||||
if (showmoves) {
|
||||
moves = KIRI.newLayer(scope.group);
|
||||
moves.lines(move, 0x888888);
|
||||
moves.lines(move, opt.move_color || 0x888888);
|
||||
}
|
||||
emits.setTransparent(false);
|
||||
// emit printing shapes
|
||||
|
|
|
|||
Loading…
Reference in a new issue