checkpoint further manual support work. disable danish
This commit is contained in:
parent
8c438d781d
commit
1a02ff192f
4 changed files with 50 additions and 10 deletions
|
|
@ -179,6 +179,14 @@
|
||||||
// API.event.emit("boolean.click");
|
// API.event.emit("boolean.click");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onButtonClick(ev) {
|
||||||
|
let target = ev.target;
|
||||||
|
while (target && target.tagName !== 'BUTTON') {
|
||||||
|
target = target.parentNode;
|
||||||
|
}
|
||||||
|
API.event.emit("button.click", target);
|
||||||
|
}
|
||||||
|
|
||||||
function inputHasFocus() {
|
function inputHasFocus() {
|
||||||
let active = DOC.activeElement;
|
let active = DOC.activeElement;
|
||||||
return active && (active.nodeName === "INPUT" || active.nodeName === "TEXTAREA");
|
return active && (active.nodeName === "INPUT" || active.nodeName === "TEXTAREA");
|
||||||
|
|
@ -220,6 +228,8 @@
|
||||||
if (KIRI.work.isSlicing()) KIRI.work.restart();
|
if (KIRI.work.isSlicing()) KIRI.work.restart();
|
||||||
// kill any poppers in compact mode
|
// kill any poppers in compact mode
|
||||||
UC.hidePoppers();
|
UC.hidePoppers();
|
||||||
|
// and send an event (used by FDM client)
|
||||||
|
API.event.emit("key.esc");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1462,12 +1472,18 @@
|
||||||
sliceSupportOffset: UC.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportOffset: UC.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
sliceSupportGap: UC.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:UC.bound(0,5), convert:UC.toInt, modes:FDM, expert:true}),
|
sliceSupportGap: UC.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:UC.bound(0,5), convert:UC.toInt, modes:FDM, expert:true}),
|
||||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
sliceSupportSpan: UC.newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportSpan: UC.newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM, show: () => UI.sliceSupportEnable.checked}),
|
||||||
sliceSupportArea: UC.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
sliceSupportArea: UC.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||||
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM, expert:true}),
|
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM, expert:true}),
|
||||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
sliceSupportNozzle: UC.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM, expert:true}, "extruders"),
|
sliceSupportNozzle: UC.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM, expert:true}, "extruders"),
|
||||||
sliceSupportEnable: UC.newBoolean(LANG.enable, onBooleanClick, {modes:FDM}),
|
sliceSupportEnable: UC.newBoolean(LANG.sp_auto_s, onBooleanClick, {title: LANG.sp_auto_l, modes:FDM, trigger:true}),
|
||||||
|
|
||||||
|
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||||
|
sliceSupportManual: UC.newRow([
|
||||||
|
(UI.ssmAdd = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
|
||||||
|
(UI.ssmClr = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
|
||||||
|
], {modes:FDM, class:"ext-buttons f-row"}),
|
||||||
|
|
||||||
camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, marker:true}),
|
camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, marker:true}),
|
||||||
camRoughTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
camRoughTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
|
|
@ -1787,10 +1803,10 @@
|
||||||
SDB.setItem('kiri-lang', 'en-us');
|
SDB.setItem('kiri-lang', 'en-us');
|
||||||
API.space.reload();
|
API.space.reload();
|
||||||
};
|
};
|
||||||
$('lset-da').onclick = function() {
|
// $('lset-da').onclick = function() {
|
||||||
SDB.setItem('kiri-lang', 'da-dk');
|
// SDB.setItem('kiri-lang', 'da-dk');
|
||||||
API.space.reload();
|
// API.space.reload();
|
||||||
};
|
// };
|
||||||
|
|
||||||
SPACE.addEventHandlers(self, [
|
SPACE.addEventHandlers(self, [
|
||||||
'keyup', keyUpHandler,
|
'keyup', keyUpHandler,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
BASE = self.base,
|
BASE = self.base,
|
||||||
UTIL = BASE.util,
|
UTIL = BASE.util,
|
||||||
FDM = KIRI.driver.FDM,
|
FDM = KIRI.driver.FDM,
|
||||||
SPACE;
|
SPACE,
|
||||||
|
func = {};
|
||||||
|
|
||||||
FDM.init = function(kiri, api) {
|
FDM.init = function(kiri, api) {
|
||||||
SPACE = api.const.SPACE;
|
SPACE = api.const.SPACE;
|
||||||
|
|
@ -20,8 +21,29 @@
|
||||||
let proc = settings.process;
|
let proc = settings.process;
|
||||||
api.ui.fdmSupport.marker.style.display = proc.sliceSupportEnable ? 'flex' : 'none';
|
api.ui.fdmSupport.marker.style.display = proc.sliceSupportEnable ? 'flex' : 'none';
|
||||||
});
|
});
|
||||||
return;
|
api.event.on("button.click", target => {
|
||||||
api.feature.hover = true;
|
switch (target) {
|
||||||
|
case api.ui.ssmAdd: return func.sadd();
|
||||||
|
case api.ui.ssmClr: return func.sclear();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
api.event.on("fdm.supports.add", func.sadd = () => {
|
||||||
|
api.show.alert("<esc> key when done editing supports");
|
||||||
|
console.log("supports add");
|
||||||
|
api.feature.hover = true;
|
||||||
|
});
|
||||||
|
api.event.on("fdm.supports.done", func.sdone = () => {
|
||||||
|
delbox('intZ');
|
||||||
|
delbox('intW');
|
||||||
|
api.feature.hover = false;
|
||||||
|
});
|
||||||
|
api.event.on("fdm.supports.clear", func.sclear = () => {
|
||||||
|
api.uc.confirm("clear supports?").then(ok => {
|
||||||
|
func.sdone();
|
||||||
|
if (ok) console.log("supports clear");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
api.event.on("key.esc", func.sdone);
|
||||||
api.event.on("mouse.hover", (data) => {
|
api.event.on("mouse.hover", (data) => {
|
||||||
const { int, type, point } = data;
|
const { int, type, point } = data;
|
||||||
if (SPACE._int1) {
|
if (SPACE._int1) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<label><i class="fas fa-caret-left"></i> language</label>
|
<label><i class="fas fa-caret-left"></i> language</label>
|
||||||
<div id="lang-pop" class="f-col">
|
<div id="lang-pop" class="f-col">
|
||||||
<div id="lset-en">english</div>
|
<div id="lset-en">english</div>
|
||||||
<div id="lset-da">danish</div>
|
<!-- <div id="lset-da">danish</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="acct-export" class="f-col a-end">
|
<div id="acct-export" class="f-col a-end">
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,8 @@ kiri.lang['en-us'] = {
|
||||||
sp_xpnd_l: "expand support area\nbeyond part boundary\nin millimeters",
|
sp_xpnd_l: "expand support area\nbeyond part boundary\nin millimeters",
|
||||||
sp_nozl_s: "extruder",
|
sp_nozl_s: "extruder",
|
||||||
sp_nozl_l: "in multi-extruder systems\nthe extruder to use for\nsupport material",
|
sp_nozl_l: "in multi-extruder systems\nthe extruder to use for\nsupport material",
|
||||||
|
sp_auto_s: "enable auto",
|
||||||
|
sp_auto_l: "enable generated supports\nusing specified parameters",
|
||||||
|
|
||||||
// LASER SLICING
|
// LASER SLICING
|
||||||
ls_offs_s: "offset",
|
ls_offs_s: "offset",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue