From 2f2009047e1477d7a3ff0be62f514a8d7a6b68d0 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 2 Jun 2024 11:00:37 -0400 Subject: [PATCH] fix lay flat --- src/kiri/init.js | 2 +- src/kiri/tools.js | 3 ++- web/kiri/index.css | 12 ++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/kiri/init.js b/src/kiri/init.js index 2ca04a7a..dd55e5a0 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -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; diff --git a/src/kiri/tools.js b/src/kiri/tools.js index f0df350a..ce1646d8 100644 --- a/src/kiri/tools.js +++ b/src/kiri/tools.js @@ -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) diff --git a/web/kiri/index.css b/web/kiri/index.css index bbbe9fa6..4a0cea83 100644 --- a/web/kiri/index.css +++ b/web/kiri/index.css @@ -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%);