1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 18:50:54 +00:00

fox for backgroundSprite resize

This commit is contained in:
lgtst 2022-06-17 01:05:02 +03:00
parent 88e7d127b3
commit 30510c943f

View File

@ -387,6 +387,7 @@ export class Window extends PsychObject
if (this._renderer) if (this._renderer)
{ {
this._renderer.backgroundColor = this._color.int; this._renderer.backgroundColor = this._color.int;
this._backgroundSprite.tint = this.color.int;
} }
// we also change the background color of the body since // we also change the background color of the body since
@ -508,6 +509,8 @@ export class Window extends PsychObject
this._resizeCallback = (e) => this._resizeCallback = (e) =>
{ {
Window._resizePixiRenderer(this, e); Window._resizePixiRenderer(this, e);
this._backgroundSprite.width = this._size[0];
this._backgroundSprite.height = this._size[1];
this._fullRefresh(); this._fullRefresh();
}; };
window.addEventListener("resize", this._resizeCallback); window.addEventListener("resize", this._resizeCallback);