fix a few mode visible elements
This commit is contained in:
parent
4d675ff2a3
commit
629d484160
5 changed files with 17 additions and 18 deletions
|
|
@ -1739,11 +1739,13 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
deviceOrigin: newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:FDM_LZR, show:() => !ui.deviceRound.checked}),
|
||||
deviceRound: newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, trigger:true, show:isNotBelt}),
|
||||
deviceBelt: newBoolean(LANG.dv_belt_s, onBooleanClick, {title:LANG.dv_belt_l, trigger:true, show:() => !ui.deviceRound.checked}),
|
||||
extruder: newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}),
|
||||
_____: newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}),
|
||||
extFilament: newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:toFloat, modes:FDM}),
|
||||
extNozzle: newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:toFloat, modes:FDM}),
|
||||
extOffsetX: newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:toFloat, modes:FDM}),
|
||||
extOffsetY: newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:toFloat, modes:FDM}),
|
||||
extruder: newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}),
|
||||
_____: newGroup(LANG.dv_gr_too, $('device2'), {group:"dext", inline:true, modes:CAM_LZR}),
|
||||
extSelect: newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode}),
|
||||
extDeselect: newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode}),
|
||||
extPad: newBlank({class:"grow", modes:FDM}),
|
||||
|
|
@ -1752,7 +1754,7 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
ui.extAdd = newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}),
|
||||
ui.extDel = newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}),
|
||||
ui.extNext = newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'})
|
||||
], {class:"dev-buttons ext-buttons"}),
|
||||
], {class:"dev-buttons ext-buttons", modes:FDM}),
|
||||
palette: newGroup(LANG.dv_gr_pal, $('palette3'), {group:"dext2", inline:true, modes:FDM}),
|
||||
paletteId: newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}),
|
||||
palettePing: newInput(LANG.dv_paps_s, {title:LANG.dv_paps_l, modes:FDM, convert:toInt}),
|
||||
|
|
@ -1763,7 +1765,7 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
paletteHeat: newInput(LANG.dv_pahe_s, {title:LANG.dv_pahe_l, modes:FDM, convert:toInt}),
|
||||
paletteCool: newInput(LANG.dv_paco_s, {title:LANG.dv_paco_l, modes:FDM, convert:toInt}),
|
||||
palettePress: newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:toInt}),
|
||||
gcode: newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}),
|
||||
_____: newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}),
|
||||
gcodeStrip: newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}),
|
||||
gcodeSpace: newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
|
||||
useLaser: newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}),
|
||||
|
|
@ -1785,13 +1787,13 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
|
||||
/** Preferences Menu */
|
||||
|
||||
lprefs: newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
|
||||
_____: newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
|
||||
antiAlias: newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}),
|
||||
reverseZoom: newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
|
||||
ortho: newBoolean(LANG.op_orth_s, booleanSave, {title:LANG.op_orth_l}),
|
||||
dark: newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}),
|
||||
devel: newBoolean(LANG.op_devl_s, booleanSave, {title:LANG.op_devl_l}),
|
||||
lprefs: newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),
|
||||
_____: newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),
|
||||
showOrigin: newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}),
|
||||
showRulers: newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}),
|
||||
showSpeeds: newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}),
|
||||
|
|
@ -1800,19 +1802,19 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
lineType: newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"),
|
||||
animesh: newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"),
|
||||
units: newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM, trace:false}, "units"),
|
||||
layout: newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
|
||||
_____: newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
|
||||
autoSave: newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}),
|
||||
autoLayout: newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
|
||||
freeLayout: newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
|
||||
spaceRandoX: newBoolean(LANG.op_spcx_s, booleanSave, {title:LANG.op_spcx_l, show:isBelt}),
|
||||
spaceLayout: newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:toFloat, size:3, units:true}),
|
||||
export: newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
|
||||
_____: newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
|
||||
exportLocal: newBoolean(`Grid:Local`, booleanSave, {title:LANG.op_exgl_l}),
|
||||
exportGhost: newBoolean(`Grid:Host`, booleanSave, {title:LANG.op_exgh_l}),
|
||||
exportOcto: newBoolean(`OctoPrint`, booleanSave, {title:LANG.op_exop_l}),
|
||||
exportThumb: newBoolean(`Thumbnail`, booleanSave, {modes:FDM}),
|
||||
exportPreview: newBoolean(`Code Preview`, booleanSave),
|
||||
parts: newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}),
|
||||
_____: newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}),
|
||||
detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"),
|
||||
healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}),
|
||||
threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:FDM_CAM_SLA}),
|
||||
|
|
|
|||
|
|
@ -338,9 +338,6 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
|||
}
|
||||
|
||||
function addModeControls(el, opt = {}) {
|
||||
if (opt.trace2) {
|
||||
console.log({ AMC: el, opt, groupName });
|
||||
}
|
||||
el.__opt = opt;
|
||||
el.showMe = function() {
|
||||
el.classList.remove('hide');
|
||||
|
|
@ -349,7 +346,6 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
|||
el.classList.add('hide');
|
||||
};
|
||||
el.setVisible = function(show) {
|
||||
if (opt.trace2) console.log({ setVisible: show, el });
|
||||
if (show) el.showMe();
|
||||
else el.hideMe();
|
||||
};
|
||||
|
|
@ -357,7 +353,7 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
|||
let xprt = opt.expert === undefined || (opt.expert === lastExpert);
|
||||
let show = opt.show ? safecall(opt.show) : true;
|
||||
let disp = opt.visible ? opt.visible() : true;
|
||||
if (opt.trace2) console.log({ setMode: el, mode, modes: el.modes, xprt, show, disp, fn: el.__opt.show });
|
||||
if (opt.manual) return;
|
||||
el.setVisible(el.hasMode(mode) && show && xprt && disp);
|
||||
}
|
||||
el.hasMode = function(mode) {
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ th, tr, td, label {
|
|||
align-items: center;
|
||||
}
|
||||
#ws-widgets button.selected {
|
||||
background-color: var(--blue-4);
|
||||
background-color: var(--blue-3);
|
||||
color: #000;
|
||||
}
|
||||
.slim-hide {
|
||||
|
|
@ -1944,14 +1944,14 @@ th, tr, td, label {
|
|||
padding: 4px;
|
||||
margin: 3px;
|
||||
}
|
||||
.set2-group .var-row {
|
||||
.set2-group .var-row, .var-row {
|
||||
background: #fff;
|
||||
padding: 1px 4px 1px 4px;
|
||||
margin: 0 !important;
|
||||
border-left: 3px solid transparent;
|
||||
border-right: 3px solid transparent;
|
||||
}
|
||||
.set2-group .var-row:hover {
|
||||
.set2-group .var-row:hover, .var-row:hover {
|
||||
border-right: 3px solid var(--blue-1);
|
||||
background-color: var(--blue-4) !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
<div class="top-menu-drop top-menu-right">
|
||||
<div class="content">
|
||||
<div id="set-device">
|
||||
<label lk="machine">machine</label>
|
||||
<label lk="machines">machines</label>
|
||||
<span><i class="fas fa-cube"></i></span>
|
||||
</div>
|
||||
<div id="set-profs">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ self.kiri.lang['en-us'] = {
|
|||
import: "import",
|
||||
language: "language",
|
||||
left: "left",
|
||||
machine: "machine", // device or machine
|
||||
machines: "machines", // device or machine
|
||||
mesh: "mesh", // mesh editing
|
||||
metric: "metric",
|
||||
name: "name",
|
||||
|
|
@ -95,6 +95,7 @@ self.kiri.lang['en-us'] = {
|
|||
// DEVICE dialog groups
|
||||
dv_gr_dev: "device",
|
||||
dv_gr_ext: "extruder",
|
||||
dv_gr_too: "tool",
|
||||
dv_gr_pal: "palette",
|
||||
dv_gr_out: "output",
|
||||
dv_gr_gco: "gcode macros",
|
||||
|
|
|
|||
Loading…
Reference in a new issue