Skip to content

Commit

Permalink
fix(Input): Use default fill color as a color source if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
CatchABus committed Dec 10, 2024
1 parent 4597616 commit 90f7fb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export class Input extends Container
}
else if (key.length === 1)
{

this._add(key);
}
else if (this.lastInputData && this.lastInputData.length === 1)
Expand All @@ -200,9 +199,10 @@ export class Input extends Container

this.options.textStyle = options.textStyle ?? defaultTextStyle;
this.options.TextClass = options.TextClass ?? Text;

const textStyle = { ...defaultTextStyle, ...options.textStyle };
const colorSource = Color.isColorLike(this.options.textStyle.fill)
? this.options.textStyle.fill
const colorSource = Color.isColorLike(textStyle.fill)
? textStyle.fill
: 0x000000;

this.inputField = new this.options.TextClass({
Expand Down

0 comments on commit 90f7fb1

Please sign in to comment.