Skip to content

API / geotoolkit / layout / FlexboxLayout / FlexboxLayout

Class: FlexboxLayout

layout.FlexboxLayout.FlexboxLayout

The custom implementation of CSS Flexbox Layout module

Hierarchy

Table of contents

Constructors
  • [new FlexboxLayout(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.layout.flexboxlayout.flexboxlayout.md#new flexboxlayout(options))
Methods
Css Properties
Name Type Description
aligncontentAlignContentSpecifies the default alignment for flex lines inside the flexible container
alignitemsAlignItemsSpecifies the default alignment for flex items inside the flexible container
flexdirectionFlexDirectionThe direction of the flexible items
flexwrapFlexWrapSpecifies whether the flexible items should wrap or not
justifycontentJustifyContentAligns the flexible container's items when the items do not use all available space on the main-axis

Contents

Constructors

new FlexboxLayout(options)

• new FlexboxLayout(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

ContainerLayout.constructor

Methods

add

▸ add(item): FlexboxLayout

Adds layoutable element

Parameters

Name Type Description
itemILayoutable | ILayoutable[] | Iterator<ILayoutable&gt;layoutable element(s)

Returns

FlexboxLayout

Overrides

ContainerLayout.add


clear

▸ clear(): FlexboxLayout

Remove all children items from layout

Returns

FlexboxLayout

Overrides

ContainerLayout.clear


clone

▸ clone(): FlexboxLayout

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

FlexboxLayout

Overrides

ContainerLayout.clone


copyConstructor

▸ Protected copyConstructor(src): FlexboxLayout

Copy constructor function.<br> Function used as part of the cloning mechanism.<br> Implementations should copy the given instance state to this instance.<br>

Parameters

Name Type Description
srcFlexboxLayoutSource to copy from

Returns

FlexboxLayout

Overrides

ContainerLayout.copyConstructor


dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

ContainerLayout.dispose


getAlignContent

▸ getAlignContent(): AlignContent

Gets a mode that specifies the default alignment for flex lines inside the flexible container.

Returns

AlignContent

alignment


getAlignItems

▸ getAlignItems(): AlignItems

Gets a mode that specifies the default alignment for items inside the flexible container

Returns

AlignItems

alignment


getClassName

▸ getClassName(): string

Returns

string

Inherited from

ContainerLayout.getClassName


getFlexDirection

▸ getFlexDirection(): FlexDirection

Gets a mode that specifies the direction of the flexible items

Returns

FlexDirection

direction


getFlexWrap

▸ getFlexWrap(): FlexWrap

Gets a mode that specifies whether the flexible items should wrap or not

Returns

FlexWrap

wrap mode


getIterator

▸ getIterator(targets): Iterator<ILayoutable&gt;

Parameters

Name Type Description
targetsILayoutable[] | Iterator<ILayoutable&gt;optional, items for iterator

Returns

Iterator<ILayoutable&gt;

Overrides

ContainerLayout.getIterator


getJustifyContent

▸ getJustifyContent(): JustifyContent

Gets a mode that aligns the flexible container's items when the items do not use all available space on the main-axis

Returns

JustifyContent

alignment


getPreferredSize

▸ getPreferredSize(rect, targets?): Rect

Return the preferable size of children. Default implementation returns desired rect

Parameters

Name Type Description
rectRectdesired rect to layout
Optional targetsILayoutable[] | Iterator<ILayoutable&gt;array of nodes supposed to layout

Returns

Rect

Inherited from

ContainerLayout.getPreferredSize


getProperties

▸ getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

properties An object containing the properties of the layout

Overrides

ContainerLayout.getProperties


hasEventListener

▸ hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

ContainerLayout.hasEventListener


insert

▸ insert(index, item): FlexboxLayout

Inserts layoutable element

Parameters

Name Type Description
indexnumberindex where element will be inserted
itemILayoutable | ILayoutable[] | Iterator<ILayoutable&gt;layoutable element(s)

Returns

FlexboxLayout

Overrides

ContainerLayout.insert


invalidateLayout

▸ invalidateLayout(): FlexboxLayout

Notify that layout is invalidated. Send event Events.LayoutInvalidated

Returns

FlexboxLayout

this

Inherited from

ContainerLayout.invalidateLayout


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

ContainerLayout.isDisposed


isSilent

▸ isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

ContainerLayout.isSilent


layout

▸ layout(rect?, targets?): FlexboxLayout

Performs layout operation

Parameters

Name Type Description
Optional rectRectdesired rect to layout
Optional targetsILayoutable[] | Iterator<ILayoutable&gt;array of nodes or iterator of nodes supposed to layout

Returns

FlexboxLayout

this

Overrides

ContainerLayout.layout


notify

▸ notify<E&gt;(type, source, args?): FlexboxLayout

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceLayoutof the event
Optional argsEventMap[E]arguments of the event

Returns

FlexboxLayout

this

Inherited from

ContainerLayout.notify


off

▸ off<E&gt;(type?, callback?): FlexboxLayout

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: FlexboxLayout, args: EventMap[E]) => voidfunction to be called

Returns

FlexboxLayout

this

Inherited from

ContainerLayout.off


on

▸ on<E&gt;(type, callback): FlexboxLayout

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target. </p>

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: FlexboxLayout, args: EventMap[E]) => voidto be called

Returns

FlexboxLayout

this

Inherited from

ContainerLayout.on


remove

▸ remove(item): FlexboxLayout

Removes a layoutable node if found

Parameters

Name Type Description
itemILayoutablelayoutable element

Returns

FlexboxLayout

Overrides

ContainerLayout.remove


setAlignContent

▸ setAlignContent(alignment): FlexboxLayout

Sets a mode that specifies the default alignment for flex lines inside the flexible container. Modifies the behavior of the FlexWrap property.

Parameters

Name Type Description
alignmentAlignContentthe alignment

Returns

FlexboxLayout


setAlignItems

▸ setAlignItems(alignment): FlexboxLayout

Sets a mode that specifies the default alignment for items inside the flexible container

Parameters

Name Type Description
alignmentAlignItemsthe alignment

Returns

FlexboxLayout


setFlexDirection

▸ setFlexDirection(direction): FlexboxLayout

Sets a mode that specifies the direction of the flexible items

Parameters

Name Type Description
directionFlexDirectionthe direction

Returns

FlexboxLayout


setFlexWrap

▸ setFlexWrap(wrap): FlexboxLayout

Sets a mode that specifies whether the flexible items should wrap or not

Parameters

Name Type Description
wrapFlexWrapthe wrap mode

Returns

FlexboxLayout


setJustifyContent

▸ setJustifyContent(alignment): FlexboxLayout

Sets a mode that aligns the flexible container's items when the items do not use all available space on the main-axis

Parameters

Name Type Description
alignmentJustifyContentthe alignment

Returns

FlexboxLayout


setProperties

▸ setProperties(properties?): FlexboxLayout

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

FlexboxLayout

this

Overrides

ContainerLayout.setProperties


setSilent

▸ setSilent(bool): FlexboxLayout

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

FlexboxLayout

this

Inherited from

ContainerLayout.setSilent


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

ContainerLayout.getClassName