mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 10:40:54 +00:00
Merge pull request #502 from lightest/CU-2au7jff_slider_radiobuttons_size
Slider radio-buttons size to match psychopy's
This commit is contained in:
commit
cd034249a3
@ -843,10 +843,10 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
||||
{
|
||||
const maxTickSize_px = Math.max(this._tickSize_px[0], this._tickSize_px[1]);
|
||||
this._body.hitArea = new PIXI.Rectangle(
|
||||
-this._barSize_px[0] / 2 - maxTickSize_px,
|
||||
-this._barSize_px[1] / 2 - maxTickSize_px,
|
||||
this._barSize_px[0] + maxTickSize_px * 2,
|
||||
this._barSize_px[1] + maxTickSize_px * 2,
|
||||
-(this._barSize_px[0] + maxTickSize_px) * 0.5,
|
||||
-(this._barSize_px[1] + maxTickSize_px) * 0.5,
|
||||
this._barSize_px[0] + maxTickSize_px,
|
||||
this._barSize_px[1] + maxTickSize_px,
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -1148,7 +1148,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
||||
else if (this._tickType === Slider.Shape.DISC)
|
||||
{
|
||||
this._body.beginFill(this._tickColor.int, 1);
|
||||
this._body.drawCircle(tickPosition_px[0], tickPosition_px[1], maxTickSize);
|
||||
this._body.drawCircle(tickPosition_px[0], tickPosition_px[1], maxTickSize * 0.5);
|
||||
this._body.endFill();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user