diff --git a/src/kiri/init.js b/src/kiri/init.js index 5b45574f..6c64ba0b 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -2067,8 +2067,8 @@ SPACE.mouse.onHover((int, event, ints) => { if (!API.feature.hover) return; - if (!int) return API.widgets.meshes(); - API.event.emit('mouse.hover', {int, event, point: int.point, type: 'widget'}); + if (!int) return API.feature.hovers || API.widgets.meshes(); + API.event.emit('mouse.hover', {int, ints, event, point: int.point, type: 'widget'}); }); SPACE.platform.onHover((int, event) => { @@ -2108,7 +2108,7 @@ return null; } else { // return selected meshes for further mouse processing - return API.selection.meshes(); + return API.feature.hovers || API.selection.meshes(); } }); @@ -2126,7 +2126,7 @@ platform.deselect(); } } else { - return API.widgets.meshes(); + return API.feature.hovers || API.widgets.meshes(); } }); diff --git a/src/mode/fdm/client.js b/src/mode/fdm/client.js index 04a76889..d209722f 100644 --- a/src/mode/fdm/client.js +++ b/src/mode/fdm/client.js @@ -12,6 +12,7 @@ p1, p2, iw, lastMode, lastView, lastPillar, isFdmMode = false, + addingSupports = false, alert = [], boxes = {}, func = {}; @@ -77,14 +78,14 @@ }); api.event.on("fdm.supports.add", func.sadd = () => { alert = api.show.alert("[esc] key cancels support editing"); - api.feature.hover = true; + api.feature.hover = addingSupports = true; }); api.event.on("fdm.supports.done", func.sdone = () => { delbox('intZ'); delbox('intW'); delbox('supp'); api.hide.alert(alert); - api.feature.hover = false; + api.feature.hover = addingSupports = false; }); api.event.on("fdm.supports.clear", func.sclear = () => { func.sdone(); @@ -136,6 +137,9 @@ if (!isFdmMode) { return; } + if (!addingSupports) { + return; + } delbox('supp'); if (lastPillar) { const {widget, box, id} = lastPillar; @@ -170,6 +174,9 @@ if (!isFdmMode) { return; } + if (!addingSupports) { + return; + } // delbox('intZ'); // delbox('intW'); // addbox(point, 0xff0000, 'intZ');