mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 09:29:02 +02:00
early-out if event undefined
This commit is contained in:
parent
8f838397a4
commit
ed4d0f2577
1 changed files with 17 additions and 1 deletions
|
@ -1654,6 +1654,10 @@ SelectionDisplay = (function() {
|
||||||
return (origin.y - intersection.y) / Vec3.distance(origin, intersection);
|
return (origin.y - intersection.y) / Vec3.distance(origin, intersection);
|
||||||
},
|
},
|
||||||
onMove: function(event) {
|
onMove: function(event) {
|
||||||
|
if (event.x === undefined || event.y === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
var pickRay = generalComputePickRay(event.x, event.y);
|
var pickRay = generalComputePickRay(event.x, event.y);
|
||||||
|
|
||||||
|
@ -1811,6 +1815,10 @@ SelectionDisplay = (function() {
|
||||||
pushCommandForSelections(duplicatedEntityIDs);
|
pushCommandForSelections(duplicatedEntityIDs);
|
||||||
},
|
},
|
||||||
onMove: function(event) {
|
onMove: function(event) {
|
||||||
|
if (event.x === undefined || event.y === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pickRay = generalComputePickRay(event.x, event.y);
|
var pickRay = generalComputePickRay(event.x, event.y);
|
||||||
|
|
||||||
// Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around
|
// Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around
|
||||||
|
@ -2060,7 +2068,11 @@ SelectionDisplay = (function() {
|
||||||
pushCommandForSelections();
|
pushCommandForSelections();
|
||||||
};
|
};
|
||||||
|
|
||||||
var onMove = function(event) {
|
var onMove = function(event)
|
||||||
|
if (event.x === undefined || event.y === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var proportional = (spaceMode === SPACE_WORLD) || directionEnum === STRETCH_DIRECTION.ALL;
|
var proportional = (spaceMode === SPACE_WORLD) || directionEnum === STRETCH_DIRECTION.ALL;
|
||||||
|
|
||||||
var position, rotation;
|
var position, rotation;
|
||||||
|
@ -2393,6 +2405,10 @@ SelectionDisplay = (function() {
|
||||||
// EARLY EXIT
|
// EARLY EXIT
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.x === undefined || event.y === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
|
|
Loading…
Reference in a new issue