add preference for object auto-layout spacing

This commit is contained in:
Stewart Allen 2021-02-09 10:35:14 -05:00
commit 2f184703e7
4 changed files with 7 additions and 3 deletions

View file

@ -646,6 +646,7 @@
showSpeeds: true, showSpeeds: true,
freeLayout: true, freeLayout: true,
autoLayout: true, autoLayout: true,
spaceLayout: 1,
units: "mm", units: "mm",
exportOcto: false, exportOcto: false,
exportGhost: false, exportGhost: false,

View file

@ -1615,12 +1615,13 @@
showSpeeds: UC.newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}), showSpeeds: UC.newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}),
lineType: UC.newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"), lineType: UC.newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"),
animesh: UC.newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"), animesh: UC.newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"),
units: UC.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action:unitsSave, modes:CAM, trace:true}, "units"), units: UC.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM, trace:true}, "units"),
layout: UC.newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}), layout: UC.newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
autoSave: UC.newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}),
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}), autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}), freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
autoSave: UC.newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}), spaceLayout: UC.newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:UC.toFloat, size:3, units:true}),
export: UC.newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}), export: UC.newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
exportOcto: UC.newBoolean(`OctoPrint`, booleanSave), exportOcto: UC.newBoolean(`OctoPrint`, booleanSave),

View file

@ -1755,7 +1755,7 @@
forAllWidgets(function(w) { platform.select(w, true) }) forAllWidgets(function(w) { platform.select(w, true) })
} }
function platformLayout(event, space) { function platformLayout(event, space = settings.controller.spaceLayout) {
let auto = UI.autoLayout.checked, let auto = UI.autoLayout.checked,
proc = settings.process, proc = settings.process,
dev = settings.device, dev = settings.device,

View file

@ -144,6 +144,8 @@ kiri.lang['en-us'] = {
op_auto_l: "automatically layout platform\nwhen new items added", op_auto_l: "automatically layout platform\nwhen new items added",
op_free_s: "free layout", op_free_s: "free layout",
op_free_l: "permit dragable layout\nno effect in laser mode", op_free_l: "permit dragable layout\nno effect in laser mode",
op_spcr_s: "spacing",
op_spcr_l: "spacing between objects\nduring auto layout\nin workspace units",
op_invr_s: "invert zoom", op_invr_s: "invert zoom",
op_invr_l: "invert mouse wheel\nscroll zoom", op_invr_l: "invert mouse wheel\nscroll zoom",
op_save_s: "auto save", op_save_s: "auto save",