11import { Action } from "../../internal/Action.js" ;
22import { Qualifier } from "../../internal/qualifier/Qualifier.js" ;
3+ import { IGradientFadeEffecModel } from "../../internal/models/IEffectActionModel.js" ;
34
45/**
56 * @description Applies a gradient fade effect from one edge of the image.
@@ -10,12 +11,14 @@ import {Qualifier} from "../../internal/qualifier/Qualifier.js";
1011class GradientFadeEffectAction extends Action {
1112 private _strength : number ;
1213 private _type : string ;
14+ protected _actionModel : IGradientFadeEffecModel = { actionType : 'GradientFade' } ;
1315
1416 /**
1517 * @description Sets the strength of the fade effect.
1618 * @param {number } strength The strength of the fade effect. (Range: 0 to 100, Server default: 20)
1719 */
1820 strength ( strength :number ) : this {
21+ this . _actionModel . strength = strength ;
1922 this . _strength = strength ;
2023 return this ;
2124 }
@@ -25,6 +28,7 @@ class GradientFadeEffectAction extends Action {
2528 * @param {string | Qualifiers.GradientFade } type The mode of gradient fade.
2629 */
2730 type ( type :string ) : this {
31+ this . _actionModel . type = type ;
2832 this . _type = type ;
2933 return this ;
3034 }
@@ -34,6 +38,7 @@ class GradientFadeEffectAction extends Action {
3438 * @param {number | string } x The x dimension of the start point.
3539 */
3640 horizontalStartPoint ( x :number | string ) : this {
41+ this . _actionModel . horizontalStartPoint = x as string ;
3742 return this . addQualifier ( new Qualifier ( 'x' , x ) ) ;
3843 }
3944
@@ -42,6 +47,7 @@ class GradientFadeEffectAction extends Action {
4247 * @param {number | string } y The y dimension of the start point.
4348 */
4449 verticalStartPoint ( y :number | string ) : this {
50+ this . _actionModel . verticalStartPoint = y as string ;
4551 return this . addQualifier ( new Qualifier ( 'y' , y ) ) ;
4652 }
4753
0 commit comments