Globe: Check for renderer on resize

This commit is contained in:
2022-09-27 09:24:20 +02:00
parent d83d609b0e
commit 594e8e976e

View File

@@ -261,6 +261,7 @@ export class Globe {
* Resize method
*/
resize () {
if (this.renderer) {
this.width = this.el.offsetWidth
this.height = this.el.offsetHeight
this.renderer.setSize(this.width, this.height)
@@ -268,6 +269,7 @@ export class Globe {
aspect: this.gl.canvas.width / this.gl.canvas.height
})
}
}
/**