fix bug when unfocusing from 360 image and clicking anywhere but a 360 sphere, which then breaks 360.

This commit is contained in:
m-schuetz 2021-06-21 18:34:32 +02:00
parent 7af850ff0e
commit 3a5aaac8c2

View File

@ -75,7 +75,7 @@ export class Images360 extends EventDispatcher{
viewer.inputHandler.addInputListener(this); viewer.inputHandler.addInputListener(this);
this.addEventListener("mousedown", () => { this.addEventListener("mousedown", () => {
if(currentlyHovered){ if(currentlyHovered && currentlyHovered.image360){
this.focus(currentlyHovered.image360); this.focus(currentlyHovered.image360);
} }
}); });