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

fixed onchange method for color;

This commit is contained in:
lgtst 2022-06-17 01:16:55 +03:00
parent 30510c943f
commit 89ba4289cc

View File

@ -75,8 +75,9 @@ export class Window extends PsychObject
this._addAttribute("fullscr", fullscr);
this._addAttribute("color", color, new Color("black"), () => {
console.log(this._backgroundSprite);
if (this._backgroundSprite) {
this._backgroundSprite.tint = color.int;
this._backgroundSprite.tint = this._color.int;
}
});
this._addAttribute("gamma", gamma, 1, () => {
@ -387,7 +388,7 @@ export class Window extends PsychObject
if (this._renderer)
{
this._renderer.backgroundColor = this._color.int;
this._backgroundSprite.tint = this.color.int;
this._backgroundSprite.tint = this._color.int;
}
// we also change the background color of the body since