mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 18:50:54 +00:00
nested ternary expression replaced by if-else if statements;
This commit is contained in:
parent
aaddd07065
commit
5f666e7e44
@ -932,7 +932,17 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
|||||||
|
|
||||||
// marker:
|
// marker:
|
||||||
this._marker = new PIXI.Graphics();
|
this._marker = new PIXI.Graphics();
|
||||||
const markerVal = Number.isFinite(this._rating) ? this._rating : (Number.isFinite(this._startValue) ? this._startValue : undefined);
|
let markerVal = undefined;
|
||||||
|
|
||||||
|
if (Number.isFinite(this._rating))
|
||||||
|
{
|
||||||
|
markerVal = this._rating;
|
||||||
|
}
|
||||||
|
else if (Number.isFinite(this._startValue))
|
||||||
|
{
|
||||||
|
markerVal = this._startValue;
|
||||||
|
}
|
||||||
|
|
||||||
if (Number.isFinite(markerVal))
|
if (Number.isFinite(markerVal))
|
||||||
{
|
{
|
||||||
this._markerPos = this._granularise(markerVal);
|
this._markerPos = this._granularise(markerVal);
|
||||||
|
Loading…
Reference in New Issue
Block a user