update device size while editing fields
This commit is contained in:
parent
9787d400e1
commit
428e13e416
2 changed files with 10 additions and 4 deletions
|
|
@ -29,7 +29,7 @@
|
||||||
"connect": "^3.7.0",
|
"connect": "^3.7.0",
|
||||||
"earcut": "^2.2.3",
|
"earcut": "^2.2.3",
|
||||||
"express-useragent": "^1.0.13",
|
"express-useragent": "^1.0.13",
|
||||||
"@jscad/modeling": "^2.7.2",
|
"@jscad/modeling": "^2.8.0",
|
||||||
"jszip": "^3.7.1",
|
"jszip": "^3.7.1",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"pixi.js": "^4.8.9",
|
"pixi.js": "^4.8.9",
|
||||||
|
|
|
||||||
|
|
@ -1001,6 +1001,12 @@ gapp.register("kiri.init", [], (root, exports) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateDeviceSize() {
|
||||||
|
api.conf.update();
|
||||||
|
platform.update_size();
|
||||||
|
platform.update_origin();
|
||||||
|
}
|
||||||
|
|
||||||
function renderDevices(devices) {
|
function renderDevices(devices) {
|
||||||
let selectedIndex = -1,
|
let selectedIndex = -1,
|
||||||
selected = api.device.get(),
|
selected = api.device.get(),
|
||||||
|
|
@ -1663,9 +1669,9 @@ gapp.register("kiri.init", [], (root, exports) => {
|
||||||
|
|
||||||
device: uc.newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}),
|
device: uc.newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}),
|
||||||
deviceName: uc.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"65%", text:true, action:updateDeviceName}),
|
deviceName: uc.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"65%", text:true, action:updateDeviceName}),
|
||||||
bedWidth: uc.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:uc.toFloat, size:6, units:true, round:2}),
|
bedWidth: uc.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:uc.toFloat, size:6, units:true, round:2, action:updateDeviceSize}),
|
||||||
bedDepth: uc.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:uc.toFloat, size:6, units:true, round:2}),
|
bedDepth: uc.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:uc.toFloat, size:6, units:true, round:2, action:updateDeviceSize}),
|
||||||
maxHeight: uc.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:uc.toFloat, size:6, modes:FDM_SLA}),
|
maxHeight: uc.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:uc.toFloat, size:6, modes:FDM_SLA, action:updateDeviceSize}),
|
||||||
resolutionX: uc.newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:uc.toInt, size:6, modes:SLA}),
|
resolutionX: uc.newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:uc.toInt, size:6, modes:SLA}),
|
||||||
resolutionY: uc.newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:uc.toInt, size:6, modes:SLA}),
|
resolutionY: uc.newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:uc.toInt, size:6, modes:SLA}),
|
||||||
spindleMax: uc.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:uc.toInt, size: 6, modes:CAM}),
|
spindleMax: uc.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:uc.toInt, size: 6, modes:CAM}),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue