add for hover/click selection override. strict support adding check
This commit is contained in:
parent
26c0a5cf69
commit
4b0ebe890d
2 changed files with 13 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue