mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Fix error in floatingUIExample.js.
Script would crash if the user left clicked somewhere not on an overlay.
This commit is contained in:
parent
22453aa3ce
commit
a21fa94f14
1 changed files with 2 additions and 2 deletions
|
@ -170,10 +170,10 @@ function onMouseDown(event) {
|
|||
function onMouseUp(event) {
|
||||
if (event.isLeftButton) {
|
||||
var overlay = OverlayManager.findAtPoint({ x: event.x, y: event.y });
|
||||
if (overlay === mouseDown.overlay) {
|
||||
if (overlay && overlay === mouseDown.overlay) {
|
||||
if (overlay.attachedPanel === bluePanel) {
|
||||
overlay.destroy();
|
||||
} else if (overlay) {
|
||||
} else {
|
||||
var oldPos = overlay.offsetPosition;
|
||||
var newPos = {
|
||||
x: Number(oldPos.x),
|
||||
|
|
Loading…
Reference in a new issue