Skip to main content

DummyTabTool

geovisto-map • Readme | API


geovisto-map / DummyTabTool

Class: DummyTabTool

This class represents dummy tool which provides empty map form. It provides empty sidebar which can be used be other tools via tab fragments.

Author​

Jiri Hynek

Extends​

Implements​

Constructors​

new DummyTabTool()​

new DummyTabTool(props?): DummyTabTool

It creates a new tool with respect to the props.

Parameters​

• props?: IMapToolProps

Returns​

DummyTabTool

Overrides​

MapTool.constructor

Source​

tools/sidebar/model/internal/dummy/DummyTabTool.ts:27

Properties​

sidebarTab​

private sidebarTab: IMapForm

Source​

tools/sidebar/model/internal/dummy/DummyTabTool.ts:20

Methods​

copy()​

copy(): IMapTool\<IMapToolProps, IMapToolDefaults, IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>, IMapToolAPI>

It creates a copy of the uninitialized tool.

Returns​

IMapTool\<IMapToolProps, IMapToolDefaults, IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>, IMapToolAPI>

Implementation of​

IDummyTabTool.copy

Overrides​

MapTool.copy

Source​

tools/sidebar/model/internal/dummy/DummyTabTool.ts:34


create()​

create(): this

It creates a tool.

Override this function.

Returns​

this

Implementation of​

IDummyTabTool.create

Inherited from​

MapTool.create

Source​

model/internal/tool/MapTool.ts:121


createDefaults()​

protected createDefaults(): IMapToolDefaults

It creates new defaults of the tool.

Returns​

IMapToolDefaults

Inherited from​

MapTool.createDefaults

Source​

model/internal/tool/MapTool.ts:53


createMapForm()​

protected createMapForm(): IMapForm

It creates new tab control.

Returns​

IMapForm

Source​

tools/sidebar/model/internal/dummy/DummyTabTool.ts:51


createState()​

protected createState(): IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>

It creates new defaults of the tool.

Returns​

IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>

Inherited from​

MapTool.createState

Source​

model/internal/tool/MapTool.ts:67


getAPIGetter()​

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns​

undefined | IMapToolAPIGetter

Implementation of​

IDummyTabTool.getAPIGetter

Inherited from​

MapTool.getAPIGetter

Source​

model/internal/tool/MapTool.ts:74


getDefaults()​

getDefaults(): IMapToolDefaults

It returns default values of the state properties.

Returns​

IMapToolDefaults

Implementation of​

IDummyTabTool.getDefaults

Inherited from​

MapTool.getDefaults

Source​

model/internal/tool/MapTool.ts:46


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Implementation of​

IDummyTabTool.getId

Inherited from​

MapTool.getId

Source​

model/internal/object/MapObject.ts:93


getMap()​

getMap(): undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Help function returns map which uses this tool.

Do not override this function. Use the state class instead.

Returns​

undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Implementation of​

IDummyTabTool.getMap

Inherited from​

MapTool.getMap

Source​

model/internal/tool/MapTool.ts:112


getMapForm()​

getMapForm(): IMapForm

It returns a sidebar tab with respect to the configuration.

Returns​

IMapForm

Implementation of​

IMapFormControl.getMapForm

Source​

tools/sidebar/model/internal/dummy/DummyTabTool.ts:41


getProps()​

getProps(): IMapToolProps

Help function which returns the props given by the programmer.

Returns​

IMapToolProps

Implementation of​

IDummyTabTool.getProps

Inherited from​

MapTool.getProps

Source​

model/internal/tool/MapTool.ts:39


getState()​

getState(): IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>

It returns the map tool state.

Returns​

IMapToolState\<IMapToolProps, IMapToolDefaults, IMapToolConfig, IMapToolInitProps\<IMapToolConfig>>

Implementation of​

IDummyTabTool.getState

Inherited from​

MapTool.getState

Source​

model/internal/tool/MapTool.ts:60


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Implementation of​

IDummyTabTool.getType

Inherited from​

MapTool.getType

Source​

model/internal/object/MapObject.ts:86


handleEvent()​

handleEvent(event): void

This function is called when a custom event is invoked.

Override this function, if needed.

Parameters​

• event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>

Returns​

void

Inherited from​

MapTool.handleEvent

Source​

model/internal/tool/MapTool.ts:171


initialize()​

initialize(initProps): this

It initializes the tool before it is created. It processes the serialized config and sets the Geovisto map which manages the tools.

This cannot be done in the tool constructor since the tool can be created before the Geovisto map is created.

This cannot be done in the tool create function since there can be possible dependencies between the tools (the tool might depend on other tools which needs to be initialized).

Parameters​

• initProps: IMapToolInitProps\<IMapToolConfig>

Returns​

this

Implementation of​

IDummyTabTool.initialize

Inherited from​

MapTool.initialize

Source​

model/internal/tool/MapTool.ts:98


isEnabled()​

isEnabled(): boolean

Help getter which returns enabled property of state.

Do not override this function. Use the state class instead.

Returns​

boolean

Implementation of​

IDummyTabTool.isEnabled

Inherited from​

MapTool.isEnabled

Source​

model/internal/tool/MapTool.ts:130


isSingleton()​

isSingleton(): boolean

Help getter which returns a logtical value whether the tool type is singleton.

Returns​

boolean

Implementation of​

IDummyTabTool.isSingleton

Inherited from​

MapTool.isSingleton

Source​

model/internal/tool/MapTool.ts:81


setEnabled()​

setEnabled(enabled): void

Some tools might be dynamicaly enabled/disabled. This function is called externally when the tool is enabled/disabled.

Override this function, if needed.

Parameters​

• enabled: boolean

Returns​

void

Implementation of​

IDummyTabTool.setEnabled

Inherited from​

MapTool.setEnabled

Source​

model/internal/tool/MapTool.ts:142


setProps()​

protected setProps(props): void

It updates the props.

Parameters​

• props: IMapObjectProps

Returns​

void

Inherited from​

MapTool.setProps

Source​

model/internal/object/MapObject.ts:38


switchEnabled()​

switchEnabled(): void

Help function which switches enabled state (enabled/disabled).

Do not override this function. Use setEnabled instead.

Returns​

void

Implementation of​

IDummyTabTool.switchEnabled

Inherited from​

MapTool.switchEnabled

Source​

model/internal/tool/MapTool.ts:158