From 61979657f17dec2e930d15a66f043af61e0b6271 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sat, 15 Jan 2022 14:02:03 -0500 Subject: [PATCH] correct plane position, limit to selection --- src/main/mesh.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/mesh.js b/src/main/mesh.js index a588d451..ec8f9e05 100644 --- a/src/main/mesh.js +++ b/src/main/mesh.js @@ -155,18 +155,19 @@ let split = { let state = split.state = { button, obj }; // for split and lay flat modes space.mouse.onHover((int, event, ints) => { + let models = api.selection.models().map(m => m.mesh); if (!event) { - return api.objects(); + return models; } let { button, buttons } = event; if (buttons) { return; } - let { dim, mid } = util.bounds(int.object); + let { dim, mid } = util.bounds(models); let { x, y, z } = int.point; state.point = { x, y, z }; obj.scale.set(dim.x, dim.y, 1); - obj.position.set(mid.x, y, mid.y); + obj.position.set(mid.x, y, -mid.y); }); temp_mode = split; },