API / geotoolkit / responsive / ResponsiveStyle / ResponsiveStyle
responsive.ResponsiveStyle.ResponsiveStyle
Type Aliases
Ƭ ApplyCallback: (source: Node) => void
▸ (source): void
| Name | Type |
|---|---|
source | Node |
void
Ƭ ConditionCallback: (node: Node, css: CssStyle) => boolean
▸ (node, css): boolean
boolean
Ƭ Options: Object
options
| Name | Type | Description |
|---|---|---|
end? | ApplyCallback | end applying options |
events? | Events[] | string[] | events to apply responsive style |
rules? | Rule[] | Rule | an array of rules |
start? | ApplyCallback | start applying options |
target? | Node | optional target to apply styles |
Ƭ OptionsOut: Object
| Name | Type | Description |
|---|---|---|
end | ApplyCallback | end applying options |
events | Events[] | string[] | events |
rules | Rule[] | an array of rules |
start | ApplyCallback | start applying options |
target | Node | optional target to apply styles |
Ƭ Rule: Object
The rule definition.
| Name | Type | Description |
|---|---|---|
apply? | ApplyCallback | a function to apply changes if condition is met. If it is specified state is not saved and css and properties are ignored |
condition? | string | { maxheight?: number ; maxwidth?: number ; minheight?: number ; minwidth?: number } | ConditionCallback | a rule condition to apply. It can be a string to represent expression or function with one parameter node or an object |
css? | string | CssStyle | a set of options with selectors specified as CSS style to be applied for selected children of the current object if a condition is met |
deep? | boolean | true if restoring state includes node children's state |
properties? | Record<string, any> | a set of properties to apply for the current object if a condition is met. It apply specified properties using setProperties method. |
restore? | boolean | restore previous state before applying new rules |