IResponsiveRule
Type interface
Defines an interface for the responsive rule, i.e. what overrides need to be applied when certain conditions are matched.
Sources
IResponsiveRule is an interface: it describes a shape of data and is not imported on its own.
Properties
idType
stringID of the rule.
Methods
relevant(target:Container)Returns
booleanA function which determines if this rule is relevant to current conditions.
Whenever the chrt size changes, this function will be run to determine whether this rule needs to be applied.
state(target:Sprite,
stateId:string)Returns
Optional<SpriteState<ISpriteProperties,ISpriteAdapters>>A function which creates and returns a
SpriteStatethat needs to be set whenever rule should be applied.This is run only once.
Once state is created, it is added to the Sprite's available states and applied as necessary.