correct plane position, limit to selection
This commit is contained in:
parent
6d79e9c91a
commit
61979657f1
1 changed files with 4 additions and 3 deletions
|
|
@ -155,18 +155,19 @@ let split = {
|
||||||
let state = split.state = { button, obj };
|
let state = split.state = { button, obj };
|
||||||
// for split and lay flat modes
|
// for split and lay flat modes
|
||||||
space.mouse.onHover((int, event, ints) => {
|
space.mouse.onHover((int, event, ints) => {
|
||||||
|
let models = api.selection.models().map(m => m.mesh);
|
||||||
if (!event) {
|
if (!event) {
|
||||||
return api.objects();
|
return models;
|
||||||
}
|
}
|
||||||
let { button, buttons } = event;
|
let { button, buttons } = event;
|
||||||
if (buttons) {
|
if (buttons) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let { dim, mid } = util.bounds(int.object);
|
let { dim, mid } = util.bounds(models);
|
||||||
let { x, y, z } = int.point;
|
let { x, y, z } = int.point;
|
||||||
state.point = { x, y, z };
|
state.point = { x, y, z };
|
||||||
obj.scale.set(dim.x, dim.y, 1);
|
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;
|
temp_mode = split;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue