LegendToolState
geovisto-map / LegendToolState
Class: LegendToolState
This class provide legend tool model.
Author
Tomas Koscielniak
Extends
Implements
Constructors
new LegendToolState()
new LegendToolState(
tool
):LegendToolState
It creates a tool state.
Parameters
• tool: ILegendTool
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolState
\<IMapToolProps
, ILegendToolDefaults
, ILegendToolConfig
>, ILegendToolConfig
, IMapToolInitProps
\<ILegendToolConfig
>>
Returns
Overrides
Source
tools/legend/model/internal/tool/LegendToolState.ts:24
Properties
legendConfig?
private
optional
legendConfig:ILegendToolConfig
[]
Source
tools/legend/model/internal/tool/LegendToolState.ts:18
legendTools?
private
optional
legendTools:string
[]
Source
tools/legend/model/internal/tool/LegendToolState.ts:19
Methods
deserialize()
deserialize(
config
):void
The metod takes config and deserializes the values.
Parameters
• config: ILegendToolConfig
Returns
void
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendToolState.ts:35
getIcon()
getIcon():
string
It returns the icon property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:120
getId()
getId():
string
It returns the id property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/object/MapObjectState.ts:87
getLabel()
getLabel():
string
It returns the label property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:104
getLegendConfig()
getLegendConfig():
undefined
|ILegendToolConfig
[]
It returns the legend config.
Returns
undefined
| ILegendToolConfig
[]
Implementation of
ILegendToolState
.getLegendConfig
Source
tools/legend/model/internal/tool/LegendToolState.ts:63
getLegendToolsConfig()
getLegendToolsConfig():
undefined
|string
[]
It returns the tools to create a legend for.
Returns
undefined
| string
[]
Implementation of
ILegendToolState
.getLegendToolsConfig
Source
tools/legend/model/internal/tool/LegendToolState.ts:70
getMap()
getMap():
IMap
\<IMapProps
,IMapDefaults
,IMapState
\<IMapProps
,IMapDefaults
,IMapConfig
>,IMapConfig
,IMapInitProps
\<IMapConfig
>>
It returns the map property of the tool state.
Returns
IMap
\<IMapProps
, IMapDefaults
, IMapState
\<IMapProps
, IMapDefaults
, IMapConfig
>, IMapConfig
, IMapInitProps
\<IMapConfig
>>
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:136
getMapObject()
protected
getMapObject():IMapObject
\<IMapObjectProps
,IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>,IMapObjectState
\<IMapObjectProps
,IMapObjectDefaults
\<IMapObjectProps
,IMapObjectConfig
>,IMapObjectConfig
,IMapObjectInitProps
\<IMapObjectConfig
>>,IMapObjectConfig
,IMapObjectInitProps
\<IMapObjectConfig
>>
It makes the map object visible to extended classes.
Returns
IMapObject
\<IMapObjectProps
, IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>, IMapObjectState
\<IMapObjectProps
, IMapObjectDefaults
\<IMapObjectProps
, IMapObjectConfig
>, IMapObjectConfig
, IMapObjectInitProps
\<IMapObjectConfig
>>, IMapObjectConfig
, IMapObjectInitProps
\<IMapObjectConfig
>>
Inherited from
Source
model/internal/object/MapObjectState.ts:39
getType()
getType():
string
It returns the type property of the tool state.
Returns
string
Implementation of
Inherited from
Source
model/internal/object/MapObjectState.ts:80
initialize()
initialize(
defaults
,props
,initProps
):void
It resets the state to the initial props.
Parameters
• defaults: IMapToolDefaults
• props: IMapToolProps
• initProps: IMapToolInitProps
Returns
void
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:42
isEnabled()
isEnabled():
boolean
It returns the enabled property of the tool state.
Returns
boolean
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:88
serialize()
serialize(
defaults
):ILegendToolConfig
The method serializes the tool state. Optionally, defaults can be set if property is undefined.
Parameters
• defaults: undefined
| ILegendToolDefaults
Returns
Implementation of
Overrides
Source
tools/legend/model/internal/tool/LegendToolState.ts:47
setEnabled()
setEnabled(
enabled
):void
It sets the enabled property of tool state.
Parameters
• enabled: boolean
Returns
void
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:97
setIcon()
setIcon(
icon
):void
It sets the icon property of the tool state.
Parameters
• icon: string
Returns
void
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:129
setId()
setId(
id
):void
It sets the id property of the tool state.
Parameters
• id: string
Returns
void
Implementation of
Inherited from
Source
model/internal/object/MapObjectState.ts:96
setLabel()
setLabel(
label
):void
It sets the label property of the tool state.
Parameters
• label: string
Returns
void
Implementation of
Inherited from
Source
model/internal/tool/MapToolState.ts:113
setMap()
protected
setMap(map
):void
It sets the map property of the tool state.
Parameters
• map: IMap
\<IMapProps
, IMapDefaults
, IMapState
\<IMapProps
, IMapDefaults
, IMapConfig
>, IMapConfig
, IMapInitProps
\<IMapConfig
>>
Returns
void