Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
cptbtptpbcptdtptp committed Jan 14, 2025
1 parent 429ebe5 commit 48f94f7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ export class ColorTransition extends Transition<Color, UIRenderer> {

private _onNormalValueChanged(): void {
if (this._finalState === InteractiveState.Normal) {
this._finalValue ||= this._normal;
this._finalValue = this._normal;
this._updateValue();
}

Check warning on line 39 in packages/ui/src/component/interactive/transition/ColorTransition.ts

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/component/interactive/transition/ColorTransition.ts#L36-L39

Added lines #L36 - L39 were not covered by tests
}

private _onHoverValueChanged(): void {
if (this._finalState === InteractiveState.Hover) {
this._finalValue ||= this._hover;
this._finalValue = this._hover;
this._updateValue();
}

Check warning on line 46 in packages/ui/src/component/interactive/transition/ColorTransition.ts

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/component/interactive/transition/ColorTransition.ts#L43-L46

Added lines #L43 - L46 were not covered by tests
}

private _onPressedValueChanged(): void {
if (this._finalState === InteractiveState.Pressed) {
this._finalValue ||= this._pressed;
this._finalValue = this._pressed;
this._updateValue();
}

Check warning on line 53 in packages/ui/src/component/interactive/transition/ColorTransition.ts

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/component/interactive/transition/ColorTransition.ts#L50-L53

Added lines #L50 - L53 were not covered by tests
}

private _onDisabledValueChanged(): void {
if (this._finalState === InteractiveState.Disable) {
this._finalValue ||= this._disabled;
this._finalValue = this._disabled;
this._updateValue();
}

Check warning on line 60 in packages/ui/src/component/interactive/transition/ColorTransition.ts

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/component/interactive/transition/ColorTransition.ts#L57-L60

Added lines #L57 - L60 were not covered by tests
}
Expand Down

0 comments on commit 48f94f7

Please sign in to comment.