fix lay flat

This commit is contained in:
Stewart Allen 2024-06-02 11:00:37 -04:00
commit 2f2009047e
3 changed files with 7 additions and 10 deletions

View file

@ -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;

View file

@ -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)

View file

@ -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%);