Last updated

API / geotoolkit / responsive / ResponsiveStyle / ResponsiveStyle

Namespace: ResponsiveStyle

responsive.ResponsiveStyle.ResponsiveStyle

Table of contents

Type Aliases

Contents

Type Aliases

ApplyCallback

Ƭ ApplyCallback: (source: Node) => void

Type declaration

▸ (source): void

Parameters
Name Type
sourceNode
Returns

void


ConditionCallback

Ƭ ConditionCallback: (node: Node, css: CssStyle) => boolean

Type declaration

▸ (node, css): boolean

Parameters
Name Type
nodeNode
cssCssStyle
Returns

boolean


Options

Ƭ Options: Object

options

Type declaration

NameTypeDescription
end?ApplyCallbackend applying options
events?Events[] | string[]events to apply responsive style
rules?Rule[] | Rulean array of rules
start?ApplyCallbackstart applying options
target?Nodeoptional target to apply styles

OptionsOut

Ƭ OptionsOut: Object

Type declaration

NameTypeDescription
endApplyCallbackend applying options
eventsEvents[] | string[]events
rulesRule[]an array of rules
startApplyCallbackstart applying options
targetNodeoptional target to apply styles

Rule

Ƭ Rule: Object

The rule definition.

Type declaration

NameTypeDescription
apply?ApplyCallbacka 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 } | ConditionCallbacka rule condition to apply. It can be a string to represent expression or function with one parameter node or an object
css?string | CssStylea 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?booleantrue 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?booleanrestore previous state before applying new rules