mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 16:48:10 +00:00
visual/TextInput: replace for...in with a forEach loop
This commit is contained in:
parent
cf0f2191f1
commit
da375e0ace
@ -674,14 +674,15 @@ export class TextInput extends PIXI.Container
|
|||||||
let states = ['DEFAULT', 'FOCUSED', 'DISABLED'];
|
let states = ['DEFAULT', 'FOCUSED', 'DISABLED'];
|
||||||
let input_bounds = this._getDOMInputBounds();
|
let input_bounds = this._getDOMInputBounds();
|
||||||
|
|
||||||
for (let i in states)
|
states.forEach((state) =>
|
||||||
{
|
{
|
||||||
this._box_cache[states[i]] = this._box_generator(
|
this._box_cache[state] = this._box_generator(
|
||||||
input_bounds.width,
|
input_bounds.width,
|
||||||
input_bounds.height,
|
input_bounds.height,
|
||||||
states[i]
|
state
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
this._previous.input_bounds = input_bounds;
|
this._previous.input_bounds = input_bounds;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user