diff --git a/src/kiri/init.js b/src/kiri/init.js index 0b10630c..1b79f126 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -1327,10 +1327,25 @@ drillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM}), drillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}), + camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}), + output: UC.newGroup(LANG.fr_menu, null, {modes:FDM}), outputRaftSpacing: UC.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:UC.toFloat, bound:UC.bound(0.0,3.0), modes:FDM}), outputRaft: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM}), + camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM}), + camTabsAngle: UC.newInput(LANG.ct_angl_s, {title:LANG.ct_angl_l, convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}), + camTabsCount: UC.newInput(LANG.ct_numb_s, {title:LANG.ct_numb_l, convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}), + camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}), + camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}), + camTabsOn: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ct_nabl_l, modes:CAM}), + + camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}), + camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), + camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), + camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), + camStockOffset: UC.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l, modes:CAM}), + output: UC.newGroup(LANG.ou_menu, null, {modes:GCODE}), outputTileSpacing: UC.newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:UC.toInt, modes:LASER}), outputTileScaling: UC.newInput(LANG.ou_scal_s, {title:LANG.ou_scal_l, convert:UC.toInt, bound:UC.bound(0.1,100), modes:LASER}), @@ -1347,36 +1362,21 @@ outputFillMult: UC.newInput(LANG.ou_flml_s, {title:LANG.ou_exml_l, convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}), outputSparseMult: UC.newInput(LANG.ou_spml_s, {title:LANG.ou_exml_l, convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}), outputFanLayer: UC.newInput(LANG.ou_fanl_s, {title:LANG.ou_fanl_l, convert:UC.toInt, bound:UC.bound(0,100), modes:FDM, expert:true}), - outputClockwise: UC.newBoolean(LANG.ou_conv_s, onBooleanClick, {title:LANG.ou_conv_l, modes:CAM}), camEaseDown: UC.newBoolean(LANG.cr_ease_s, onBooleanClick, {title:LANG.cr_ease_l, modes:CAM}), camDepthFirst: UC.newBoolean(LANG.ou_depf_s, onBooleanClick, {title:LANG.ou_depf_l, modes:CAM}), - camZTopOffset: UC.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:UC.toFloat, modes:CAM}), - camZBottom: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, modes:CAM}), - camZClearance: UC.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:UC.toFloat, bound:UC.bound(0.01,100), modes:CAM}), - - camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM}), - camTabsAngle: UC.newInput(LANG.ct_angl_s, {title:LANG.ct_angl_l, convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}), - camTabsCount: UC.newInput(LANG.ct_numb_s, {title:LANG.ct_numb_l, convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}), - camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}), - camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}), - camTabsOn: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ct_nabl_l, modes:CAM}), - - camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}), - camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), - camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), - camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}), - camStockOffset: UC.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l, modes:CAM}), - - camCommon: UC.newGroup(LANG.cc_menu, null, {modes:CAM}), - camFastFeedZ: UC.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:UC.toInt, modes:CAM}), - camFastFeed: UC.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:UC.toInt, modes:CAM}), - camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0.001,1.0), modes:CAM}), - outputOriginBounds: UC.newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l, modes:LASER}), outputOriginCenter: UC.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l, modes:CAM_LASER}), camOriginTop: UC.newBoolean(LANG.or_topp_s, onBooleanClick, {title:LANG.or_topp_l, modes:CAM}), + camCommon: UC.newGroup(LANG.cc_menu, null, {modes:CAM}), + camZTopOffset: UC.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:UC.toFloat, modes:CAM}), + camZBottom: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, modes:CAM}), + camZClearance: UC.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:UC.toFloat, bound:UC.bound(0.01,100), modes:CAM}), + camFastFeedZ: UC.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:UC.toInt, modes:CAM}), + camFastFeed: UC.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:UC.toInt, modes:CAM}), + camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0.001,1.0), modes:CAM}), + advanced: UC.newGroup(LANG.ad_menu, null, {modes:FDM, expert:true}), outputRetractDist: UC.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:UC.toFloat, modes:FDM, expert:true}), outputRetractSpeed: UC.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:UC.toInt, modes:FDM, expert:true}), @@ -1395,7 +1395,7 @@ outputLayerRetract: UC.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM, expert:true}), // SLA - slaProc: UC.newGroup(LANG.ad_menu, null, {modes:SLA, group:"sla-slice"}), + slaProc: UC.newGroup(LANG.sa_menu, null, {modes:SLA, group:"sla-slice"}), slaSlice: UC.newInput(LANG.sa_lahe_s, {title:LANG.sa_lahe_l, convert:UC.toFloat, modes:SLA}), slaShell: UC.newInput(LANG.sa_shel_s, {title:LANG.sa_shel_l, convert:UC.toFloat, modes:SLA}), slaOpenTop: UC.newBoolean(LANG.sa_otop_s, onBooleanClick, {title:LANG.sa_otop_l, modes:SLA}), diff --git a/src/kiri/ui.js b/src/kiri/ui.js index 01e35d80..b101cf8d 100644 --- a/src/kiri/ui.js +++ b/src/kiri/ui.js @@ -106,9 +106,10 @@ poppable[group] = opt.inline === true ? false : true; let row = DOC.createElement('div'), - a = DOC.createElement('a'), dbkey = `beta-${prefix}-show-${group}`, - popper = !opt.inline; + popper = !opt.inline && label, + link; + if (popper) { let pop = DOC.createElement('div'); @@ -117,34 +118,43 @@ row.setAttribute("class", "set-group noselect"); addTo = pop; } else { - row.setAttribute("class", "set-header col"); + if (opt.class) { + opt.class.split(' ').forEach(ce => { + row.classList.add(ce); + }); + } else { + row.setAttribute("class", "set-header col"); + } addTo = lastDiv; } div.appendChild(row); - row.appendChild(a); - a.appendChild(DOC.createTextNode(label)); + if (label) { + link = DOC.createElement('a'); + link.appendChild(DOC.createTextNode(label)); + row.appendChild(link); + } addModeControls(row, opt); lastGroup = groups[group] = []; lastGroup.key = dbkey; groupName = group; groupShow[group] = popper ? state[dbkey] === 'true' : state[dbkey] !== 'false'; row.onclick = function(ev) { - if (ev.target !== a && ev.target !== row) { + if (ev.target !== link && ev.target !== row) { return; } toggleGroup(group, dbkey); }; if (popper) { row.onmouseenter = function(ev) { - if (ev.target !== a && ev.target !== row) { + if (ev.target !== link && ev.target !== row) { return; } clearTimeout(exitimer); showGroup(group); }; row.onmouseleave = function(ev) { - if (ev.target !== a && ev.target !== row) { + if (ev.target !== link && ev.target !== row) { return; } clearTimeout(exitimer); diff --git a/web/kiri/index.css b/web/kiri/index.css index b0741bff..34aaf1c0 100644 --- a/web/kiri/index.css +++ b/web/kiri/index.css @@ -839,6 +839,11 @@ th, tr, td { background-color: var(--bg-gray); height: 10px; } +.set-sep { + background-color: var(--bg-gray) !important; + height: 10px; + right: -9px; +} .set-header { background-color: rgba(0,0,0,0.1); text-align: center; diff --git a/web/kiri/lang/en.js b/web/kiri/lang/en.js index 2b1376b6..7c288f97 100644 --- a/web/kiri/lang/en.js +++ b/web/kiri/lang/en.js @@ -427,7 +427,7 @@ kiri.lang['en-us'] = { sa_pldr_s: "peel drop rate", sa_pldr_l: "peel drop speed\nin mm/sec", - sa_base_m: "base layers", + sa_base_m: "base", sa_balc_s: "layer count", sa_balc_l: "number of\nbase layers", sa_bltn_l: "base layer light on\ntime in seconds",