mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 18:50:54 +00:00
Fix: setReadOnly(false) was having no effect
As noted in this discourse post: https://discourse.psychopy.org/t/slider-setreadonly-sets-contrast-incorrectly/7055 Also, I wonder if we should be changing contrast by halving the color values (if they are signed color vals) rather than the transparency, in keeping with the Python version. Transparency will be weird if the scale is on a textured backgorund?
This commit is contained in:
parent
becf79b5d6
commit
9f0d4f75ce
@ -274,6 +274,8 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin)
|
||||
// halve the opacity:
|
||||
if (readOnly)
|
||||
this._opacity /= 2.0;
|
||||
else
|
||||
this._opacity *= 2.0;
|
||||
|
||||
this._needUpdate = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user