move render menu to right panel
This commit is contained in:
parent
11ce3a026d
commit
af7d1de2fb
5 changed files with 110 additions and 55 deletions
|
|
@ -2445,13 +2445,13 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
return lbl;
|
||||
}
|
||||
|
||||
for (let mode of ["fdm","sla","cam","laser"]) {
|
||||
if (api.feature.modes.indexOf(mode) >= 0) {
|
||||
$(`mode-${mode}`).appendChild(mksvg(icons[mode]));
|
||||
} else {
|
||||
$(`mode-${mode}`).style.display = 'none';
|
||||
}
|
||||
}
|
||||
// for (let mode of ["fdm","sla","cam","laser"]) {
|
||||
// if (api.feature.modes.indexOf(mode) >= 0) {
|
||||
// $(`mode-${mode}`).appendChild(mksvg(icons[mode]));
|
||||
// } else {
|
||||
// $(`mode-${mode}`).style.display = 'none';
|
||||
// }
|
||||
// }
|
||||
|
||||
api.platform.update_size();
|
||||
|
||||
|
|
@ -2789,10 +2789,10 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
$('view-left').onclick = space.view.left;
|
||||
$('view-right').onclick = space.view.right;
|
||||
$('view-clear').onclick = api.platform.clear;
|
||||
$('mode-fdm').onclick = () => { api.mode.set('FDM'); api.space.set_focus() };
|
||||
$('mode-sla').onclick = () => { api.mode.set('SLA'); api.space.set_focus() };
|
||||
$('mode-cam').onclick = () => { api.mode.set('CAM'); api.space.set_focus() };
|
||||
$('mode-laser').onclick = () => { api.mode.set('LASER'); api.space.set_focus() };
|
||||
// $('mode-fdm').onclick = () => { api.mode.set('FDM'); api.space.set_focus() };
|
||||
// $('mode-sla').onclick = () => { api.mode.set('SLA'); api.space.set_focus() };
|
||||
// $('mode-cam').onclick = () => { api.mode.set('CAM'); api.space.set_focus() };
|
||||
// $('mode-laser').onclick = () => { api.mode.set('LASER'); api.space.set_focus() };
|
||||
$('unrotate').onclick = () => {
|
||||
api.widgets.for(w => w.unrotate());
|
||||
api.selection.update_info();
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ gapp.register("kiri.main", [], (root, exports) => {
|
|||
switch (mode) {
|
||||
case VIEWS.ARRANGE:
|
||||
api.function.clear_progress();
|
||||
UI.back.style.display = '';
|
||||
// UI.back.style.display = '';
|
||||
UI.render.style.display = '';
|
||||
kiri.client.clear();
|
||||
STACKS.clear();
|
||||
|
|
@ -907,14 +907,14 @@ gapp.register("kiri.main", [], (root, exports) => {
|
|||
modename.onchange = (ev) => setMode(optlist[options.selectedIndex]);
|
||||
}
|
||||
// highlight relevant device mode button
|
||||
["fdm","sla","cam","laser"].forEach(dev => {
|
||||
let cl = $(`mode-${dev}`).classList;
|
||||
if (dev === mode.toLowerCase()) {
|
||||
cl.add("dev-sel");
|
||||
} else {
|
||||
cl.remove("dev-sel");
|
||||
}
|
||||
});
|
||||
// ["fdm","sla","cam","laser"].forEach(dev => {
|
||||
// let cl = $(`mode-${dev}`).classList;
|
||||
// if (dev === mode.toLowerCase()) {
|
||||
// cl.add("dev-sel");
|
||||
// } else {
|
||||
// cl.remove("dev-sel");
|
||||
// }
|
||||
// });
|
||||
// restore cached device profile for this mode
|
||||
if (current.cdev[mode]) {
|
||||
current.device = clone(current.cdev[mode]);
|
||||
|
|
|
|||
|
|
@ -283,16 +283,16 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
|||
row.appendChild(link);
|
||||
}
|
||||
|
||||
if (opt.separator) {
|
||||
const sep = DOC.createElement('div');
|
||||
sep.classList.add('set2-sep');
|
||||
sep.innerHTML = [
|
||||
'<div class="line-sep2"></div>',
|
||||
'<div class="chonk2"></div>',
|
||||
'<div class="line-sep2"></div>',
|
||||
].join('');
|
||||
lastDiv.appendChild(sep);
|
||||
}
|
||||
// if (opt.separator) {
|
||||
// const sep = DOC.createElement('div');
|
||||
// sep.classList.add('set2-sep');
|
||||
// sep.innerHTML = [
|
||||
// '<div class="line-sep2"></div>',
|
||||
// '<div class="chonk2"></div>',
|
||||
// '<div class="line-sep2"></div>',
|
||||
// ].join('');
|
||||
// lastDiv.appendChild(sep);
|
||||
// }
|
||||
|
||||
addModeControls(row, opt);
|
||||
lastGroup = groups[group] = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue