Merge branch 'dev-4.0-refactor-ui'
This commit is contained in:
commit
55b7c05bef
9 changed files with 27 additions and 26 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "grid-apps",
|
||||
"version": "4.0.8D",
|
||||
"version": "4.0.9D",
|
||||
"description": "grid.space 3d slice & modeling tools",
|
||||
"author": "Stewart Allen <sa@grid.space>",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -103,10 +103,12 @@ CAM.init = function(kiri, api) {
|
|||
return;
|
||||
}
|
||||
const clockOp = cp.ops.filter(op => op.type === '|')[0];
|
||||
if (isIndexed && !clockOp) {
|
||||
// if (isIndexed && !clockOp) {
|
||||
// func.opAdd(popOp['|'].new());
|
||||
// } else if (!isIndexed && clockOp) {
|
||||
// func.opDel(clockOp);
|
||||
if (!clockOp) {
|
||||
func.opAdd(popOp['|'].new());
|
||||
} else if (!isIndexed && clockOp) {
|
||||
func.opDel(clockOp);
|
||||
} else {
|
||||
func.opRender();
|
||||
}
|
||||
|
|
@ -457,7 +459,7 @@ CAM.init = function(kiri, api) {
|
|||
currentIndex = isIndexed && !isPreview ? index * DEG2RAD : 0;
|
||||
}
|
||||
|
||||
// (re)render thea re-orderable op list
|
||||
// (re)render the re-orderable op list
|
||||
api.event.on("cam.op.render", func.opRender = () => {
|
||||
let oplist = current.process.ops;
|
||||
if (!(isCamMode && oplist)) {
|
||||
|
|
@ -470,18 +472,18 @@ CAM.init = function(kiri, api) {
|
|||
let scale = API.view.unit_scale();
|
||||
let notime = false;
|
||||
oplist.forEach((rec,i) => {
|
||||
let title = '';
|
||||
let clock = rec.type === '|';
|
||||
// let label = clock ? `<i class="fa-regular fa-clock"></i>` : rec.type;
|
||||
let label = clock ? `` : rec.type;
|
||||
let clazz = notime ? [ "draggable", "notime" ] : [ "draggable" ];
|
||||
let notable = rec.note?.split(' ').filter(v => v.charAt(0) === '#');
|
||||
if (clock) clazz.push('clock');
|
||||
if (clock) { clazz.push('clock'); title = ` title="end of ops chain\ndrag/drop like an op\nops after this are disabled"` }
|
||||
if (notable?.length) label = notable[0].slice(1);
|
||||
html.appendAll([
|
||||
`<div id="${mark+i}" class="${clazz.join(' ')}">`,
|
||||
`<div id="${mark+i}" class="${clazz.join(' ')}"${title}>`,
|
||||
`<label class="label">${label}</label>`,
|
||||
clock ? '' :
|
||||
`<label id="${mark+i}-x" class="del"><i class="fa-regular fa-circle-xmark"></i></label>`,
|
||||
`<label id="${mark+i}-x" class="del"><i class="fa fa-trash"></i></label>`,
|
||||
`</div>`
|
||||
]);
|
||||
bind[mark+i] = rec;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ FDM.init = function(kiri, api) {
|
|||
let id = (now++).toString(36);
|
||||
let rows = Object.entries(range.fields).map(a => `<div><label class="pad">${rangeVars[a[0]]}</label><span></span><label class="val">${a[1]}</label></div>`).join('');
|
||||
let hover = `<div id="hov_${id}" class="range-detail">${rows}</div>`;
|
||||
let info = `<button id="sel_${id}" class="j-center grow">${range.lo} - ${range.hi}</button><button id="del_${id}"><i class="far fa-trash-alt"></i></button>`;
|
||||
let info = `<button id="sel_${id}" class="j-center grow">${range.lo} - ${range.hi}</button><button id="del_${id}"><i class="fa fa-trash"></i></button>`;
|
||||
html.appendAll([
|
||||
`<div id="rng_${id}" class="range-info">${hover}${info}</div>`
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -2760,7 +2760,7 @@ gapp.register("kiri.init", [], (root, exports) => {
|
|||
};
|
||||
$('context-duplicate').onclick = duplicateSelection;
|
||||
$('context-mirror').onclick = mirrorSelection;
|
||||
$('context-layflat').onclick = layFlat;
|
||||
$('context-layflat').onclick = () => { api.event.emit("tool.mesh.lay-flat") };
|
||||
$('context-setfocus').onclick = setFocus;
|
||||
|
||||
ui.modal.onclick = api.modal.hide;
|
||||
|
|
|
|||
|
|
@ -126,8 +126,9 @@ api.event.on('mouse.hover', (ev) => {
|
|||
pmesh.position.y = -v.z;
|
||||
pmesh.position.z = v.y;
|
||||
} else {
|
||||
const zcomp = api.mode.get() === 'CAM' ? track.tzoff : 0;
|
||||
pmesh.position.y = -point.z - opos.y + norm.y * 0.1;
|
||||
pmesh.position.z = point.y + track.tzoff + norm.z * 0.1;
|
||||
pmesh.position.z = point.y + zcomp + norm.z * 0.1;
|
||||
}
|
||||
let q = new Quaternion().setFromUnitVectors(ZAXIS,
|
||||
new Vector3(norm.x,norm.y,norm.z)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ gapp.main("main.kiri", [], (root) => {
|
|||
const modfns = root.kirimod = ( root.kirimod || [] );
|
||||
|
||||
const kiri = root.kiri = {
|
||||
beta: 4008,
|
||||
beta: 4009,
|
||||
driver: {}, // driver modules
|
||||
load(fn) {
|
||||
modfns.push(fn);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
let terms = {
|
||||
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE: "See the license.md file included with the source distribution",
|
||||
VERSION: (is_self ? self : this).debug_version || "4.0.D8"
|
||||
VERSION: (is_self ? self : this).debug_version || "4.0.D9"
|
||||
};
|
||||
|
||||
if (typeof(module) === 'object') {
|
||||
|
|
|
|||
|
|
@ -722,9 +722,6 @@ th, tr, td, label {
|
|||
.movable {
|
||||
margin: 5px;
|
||||
}
|
||||
.movable input {
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
}
|
||||
.movable .title {
|
||||
color: white;
|
||||
padding: 2px 3px 1px 3px;
|
||||
|
|
@ -737,10 +734,9 @@ th, tr, td, label {
|
|||
.movable .body {
|
||||
margin: 0;
|
||||
padding: 0 5px 0 0;
|
||||
background-color: rgba(245,245,245,0.8);
|
||||
}
|
||||
.movable:hover .body {
|
||||
background-color: rgba(245,245,245,0.95);
|
||||
background-color: #fff;
|
||||
border-left: 1px solid #eee;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
.movable .footer {
|
||||
height: 10px;
|
||||
|
|
@ -780,7 +776,7 @@ th, tr, td, label {
|
|||
|
||||
#float-tools {
|
||||
position: absolute;
|
||||
margin: 0 0 0 5px;
|
||||
margin: 0;
|
||||
top: 50px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
|
@ -1063,6 +1059,9 @@ th, tr, td, label {
|
|||
#oplist .clock:hover {
|
||||
background-color: var(--blue-2);
|
||||
}
|
||||
#oplist > div {
|
||||
padding: 5px 20px 5px 7px !important;
|
||||
}
|
||||
#oplist > div, .opdiv {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -1094,10 +1093,9 @@ th, tr, td, label {
|
|||
}
|
||||
#oplist div .del {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 2px;
|
||||
right: 6px;
|
||||
font-size: 14px;
|
||||
color: rgba(0,0,0,0);
|
||||
color: rgba(0,0,0,0.25);
|
||||
}
|
||||
.dark #oplist div:hover .del {
|
||||
color: #777;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Kiri:Moto 4.0.D8",
|
||||
"name": "Kiri:Moto 4.0.D9",
|
||||
"short_name": "Kiri:Moto",
|
||||
"description": "Slicer for 3D printers, CNC mills, laser cutters and more",
|
||||
"start_url": "/kiri/",
|
||||
|
|
|
|||
Loading…
Reference in a new issue