mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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);
|
||||
},
|
||||
onMove: function(event) {
|
||||
if (event.x === undefined || event.y === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wantDebug = false;
|
||||
var pickRay = generalComputePickRay(event.x, event.y);
|
||||
|
||||
|
@ -1811,6 +1815,10 @@ SelectionDisplay = (function() {
|
|||
pushCommandForSelections(duplicatedEntityIDs);
|
||||
},
|
||||
onMove: function(event) {
|
||||
if (event.x === undefined || event.y === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
var pickRay = generalComputePickRay(event.x, event.y);
|
||||
|
||||
// Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around
|
||||
|
@ -2060,7 +2068,11 @@ SelectionDisplay = (function() {
|
|||
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 position, rotation;
|
||||
|
@ -2393,6 +2405,10 @@ SelectionDisplay = (function() {
|
|||
// EARLY EXIT
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.x === undefined || event.y === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wantDebug = false;
|
||||
if (wantDebug) {
|
||||
|
|
Loading…
Reference in a new issue