mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Disable editModels.js mouse events when ALT is pressed. (no conflict with inspect.js)
This commit is contained in:
parent
d5aa12db7d
commit
b3b3a72946
1 changed files with 24 additions and 0 deletions
|
@ -691,6 +691,10 @@ function rayPlaneIntersection(pickRay, point, normal) {
|
|||
}
|
||||
|
||||
function mousePressEvent(event) {
|
||||
if (altIsPressed) {
|
||||
return;
|
||||
}
|
||||
|
||||
mouseLastPosition = { x: event.x, y: event.y };
|
||||
modelSelected = false;
|
||||
var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y});
|
||||
|
@ -790,6 +794,10 @@ var oldModifier = 0;
|
|||
var modifier = 0;
|
||||
var wasShifted = false;
|
||||
function mouseMoveEvent(event) {
|
||||
if (altIsPressed) {
|
||||
return;
|
||||
}
|
||||
|
||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||
|
||||
if (!modelSelected) {
|
||||
|
@ -894,6 +902,10 @@ function mouseMoveEvent(event) {
|
|||
}
|
||||
|
||||
function mouseReleaseEvent(event) {
|
||||
if (altIsPressed) {
|
||||
return;
|
||||
}
|
||||
|
||||
modelSelected = false;
|
||||
|
||||
glowedModelID.id = -1;
|
||||
|
@ -962,4 +974,16 @@ Menu.menuItemEvent.connect(function(menuItem){
|
|||
}
|
||||
});
|
||||
|
||||
// handling of inspect.js concurrence
|
||||
altIsPressed = false;
|
||||
Controller.keyPressEvent.connect(function(event) {
|
||||
if (event.text == "ALT") {
|
||||
altIsPressed = true;
|
||||
}
|
||||
});
|
||||
Controller.keyReleaseEvent.connect(function(event) {
|
||||
if (event.text == "ALT") {
|
||||
altIsPressed = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue