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}),
|
layerDelta: UC.newBoolean(LANG.la_dlta, onLayerToggle, {modes:FDM}),
|
||||||
layerSolid: UC.newBoolean(LANG.la_slds, onLayerToggle, {modes:FDM}),
|
layerSolid: UC.newBoolean(LANG.la_slds, onLayerToggle, {modes:FDM}),
|
||||||
layerPrint: UC.newBoolean(LANG.la_prnt, onLayerToggle, {modes:GCODE}),
|
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() {
|
function showLaserKnife() {
|
||||||
|
|
|
||||||
|
|
@ -593,6 +593,19 @@
|
||||||
return showing;
|
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
|
* hide or show slice-layers and their sub-elements
|
||||||
*
|
*
|
||||||
|
|
@ -603,6 +616,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MODE === MODES.CAM) {
|
||||||
|
setWidgetVisibility(UI.layerParts.checked);
|
||||||
|
}
|
||||||
|
|
||||||
showSlider();
|
showSlider();
|
||||||
|
|
||||||
if (typeof(layer) === 'string' || typeof(layer) === 'number') {
|
if (typeof(layer) === 'string' || typeof(layer) === 'number') {
|
||||||
|
|
@ -1997,13 +2014,16 @@
|
||||||
hideSlider();
|
hideSlider();
|
||||||
clearWidgetCache();
|
clearWidgetCache();
|
||||||
updateSliderMax();
|
updateSliderMax();
|
||||||
|
setWidgetVisibility(true);
|
||||||
break;
|
break;
|
||||||
case VIEWS.SLICE:
|
case VIEWS.SLICE:
|
||||||
$('lt-back').style.display = 'flex';
|
$('lt-back').style.display = 'flex';
|
||||||
updateSliderMax();
|
updateSliderMax();
|
||||||
|
setWidgetVisibility(true);
|
||||||
break;
|
break;
|
||||||
case VIEWS.PREVIEW:
|
case VIEWS.PREVIEW:
|
||||||
$('lt-back').style.display = 'flex';
|
$('lt-back').style.display = 'flex';
|
||||||
|
setWidgetVisibility(true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DBUG.log("invalid view mode: "+mode);
|
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) {
|
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);
|
emits = KIRI.newLayer(scope.group);
|
||||||
if (showmoves) {
|
if (showmoves) {
|
||||||
moves = KIRI.newLayer(scope.group);
|
moves = KIRI.newLayer(scope.group);
|
||||||
moves.lines(move, 0x888888);
|
moves.lines(move, opt.move_color || 0x888888);
|
||||||
}
|
}
|
||||||
emits.setTransparent(false);
|
emits.setTransparent(false);
|
||||||
// emit printing shapes
|
// emit printing shapes
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ kiri.lang['en-us'] = {
|
||||||
la_sprt: "supports",
|
la_sprt: "supports",
|
||||||
la_prnt: "print",
|
la_prnt: "print",
|
||||||
la_move: "moves",
|
la_move: "moves",
|
||||||
|
la_part: "parts",
|
||||||
|
|
||||||
// SETTINGS
|
// SETTINGS
|
||||||
se_menu: "library",
|
se_menu: "library",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue