ConnectionLayerTool
geovisto-map / ConnectionLayerTool
Class: ConnectionLayerTool
This class represents Connection layer tool. It uses SVG layer and D3 to draw the lines.
Author
Jiri Hynek
Extends
Implements
Constructors
new ConnectionLayerTool()
new ConnectionLayerTool(
props?):ConnectionLayerTool
It creates a new tool with respect to the props.
Parameters
• props?: IConnectionLayerToolProps
Returns
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:77
Properties
animateDirectionUtil
privateanimateDirectionUtil:AnimateDirectionUtil
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:68
connectionsPaths
privateconnectionsPaths:Record\<string,Selection\<BaseType,any,any,any>>
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:70
mapForm
privatemapForm:IMapForm
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:64
selectionChangeAdapter
privateselectionChangeAdapter:ConnectionLayerToolSelectionChangeAdapter
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:66
themeChangeAdapter
privatethemeChangeAdapter:ConnectionLayerToolThemeChangeAdapter
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:67
Methods
bucketHashToGeoIds()
protectedbucketHashToGeoIds(bucketHash):string[]
It returns the the geo ids (from, to) used in data bucket hash.
Parameters
• bucketHash: string
Returns
string[]
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:224
copy()
copy():
IConnectionLayerTool\<IConnectionLayerToolProps,IConnectionLayerToolDefaults,IConnectionLayerToolState\<IConnectionLayerToolProps,IConnectionLayerToolDefaults,IConnectionLayerToolConfig,object,object>,IConnectionLayerToolConfig,IMapToolInitProps\<IConnectionLayerToolConfig>>
It creates a copy of the uninitialized tool.
Returns
IConnectionLayerTool\<IConnectionLayerToolProps, IConnectionLayerToolDefaults, IConnectionLayerToolState\<IConnectionLayerToolProps, IConnectionLayerToolDefaults, IConnectionLayerToolConfig, object, object>, IConnectionLayerToolConfig, IMapToolInitProps\<IConnectionLayerToolConfig>>
Implementation of
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:86
create()
create():
this
It creates new layer with respect to configuration
Returns
this
Implementation of
Inherited from
Source
model/internal/layer/AbstractLayerTool.ts:89
createDefaults()
protectedcreateDefaults():IConnectionLayerToolDefaults
It creates new defaults of the tool.
Returns
Overrides
AbstractLayerTool.createDefaults
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:107
createLayerItems()
protectedcreateLayerItems():Layer[]
It creates layer items.
Returns
Layer[]
Overrides
AbstractLayerTool.createLayerItems
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:184
createMapForm()
protectedcreateMapForm():IMapForm
It creates new tab control.
Returns
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:168
createState()
protectedcreateState():IConnectionLayerToolState\<IConnectionLayerToolProps,IConnectionLayerToolDefaults,IConnectionLayerToolConfig,object,object>
It returns default tool state.
Returns
IConnectionLayerToolState\<IConnectionLayerToolProps, IConnectionLayerToolDefaults, IConnectionLayerToolConfig, object, object>
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:121
deleteLayerItems()
protecteddeleteLayerItems():void
It deletes layer items.
Returns
void
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:200
geoIdsToBucketHash()
protectedgeoIdsToBucketHash(from,to):string
It returns the hash of (from, to) used in data buckets.
Parameters
• from: string
• to: string
Returns
string
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:215
getAPIGetter()
getAPIGetter():
undefined|IMapToolAPIGetter
It returns the tool API
Returns
undefined | IMapToolAPIGetter
Implementation of
IConnectionLayerTool.getAPIGetter
Inherited from
AbstractLayerTool.getAPIGetter
Source
model/internal/tool/MapTool.ts:74
getAnimateDirectionUtil()
protectedgetAnimateDirectionUtil():AnimateDirectionUtil
It returns theme change adapter.
Returns
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:148
getDefaults()
getDefaults():
IConnectionLayerToolDefaults
It returns default values of the state properties.
Returns
Implementation of
IConnectionLayerTool.getDefaults
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:100
getId()
getId():
string
Help function which returns the id of the object.
Returns
string
Implementation of
Inherited from
Source
model/internal/object/MapObject.ts:93
getLayerItems()
getLayerItems():
Layer[]
It returns layer items which should be rendered.
Returns
Layer[]
Implementation of
IConnectionLayerTool.getLayerItems
Inherited from
AbstractLayerTool.getLayerItems
Source
model/internal/layer/AbstractLayerTool.ts:163
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
Inherited from
Source
model/internal/tool/MapTool.ts:112
getMapForm()
getMapForm():
IMapForm
It returns a sidebar tab with respect to the configuration.
Returns
Implementation of
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:158
getProps()
getProps():
IConnectionLayerToolProps
It returns the props given by the programmer.
Returns
Implementation of
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:93
getSelectionChangeAdapter()
protectedgetSelectionChangeAdapter():ConnectionLayerToolSelectionChangeAdapter
It returns selection change adapter.
Returns
ConnectionLayerToolSelectionChangeAdapter
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:128
getState()
getState():
IConnectionLayerToolState\<IConnectionLayerToolProps,IConnectionLayerToolDefaults,IConnectionLayerToolConfig,object,object>
It returns the layer tool state.
Returns
IConnectionLayerToolState\<IConnectionLayerToolProps, IConnectionLayerToolDefaults, IConnectionLayerToolConfig, object, object>
Implementation of
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:114
getThemeChangeAdapter()
protectedgetThemeChangeAdapter():ConnectionLayerToolThemeChangeAdapter
It returns theme change adapter.
Returns
ConnectionLayerToolThemeChangeAdapter
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:138
getType()
getType():
string
Help function which returns the type of the object.
Returns
string
Implementation of
Inherited from
Source
model/internal/object/MapObject.ts:86
handleEvent()
handleEvent(
event):void
This function is called when a custom event is invoked.
Parameters
• event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>
Returns
void
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:632
hideLayerItems()
protectedhideLayerItems():void
Help function which hides layer items
This function is meant to be private.
Returns
void
Inherited from
AbstractLayerTool.hideLayerItems
Source
model/internal/layer/AbstractLayerTool.ts:147
initialize()
initialize(
initProps):this
Overrides the super method.
Parameters
• initProps: IMapToolInitProps\<IConnectionLayerToolConfig>
Returns
this
Implementation of
IConnectionLayerTool.initialize
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:177
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
IConnectionLayerTool.isEnabled
Inherited from
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
IConnectionLayerTool.isSingleton
Inherited from
Source
model/internal/tool/MapTool.ts:81
render()
render(
type,animateOptions?):void
It reloads data and redraw the layer.
Parameters
• type: number
• animateOptions?: IDataChangeAnimateOptions
Returns
void
Implementation of
Overrides
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:578
renderConnections()
protectedrenderConnections(animateOptions):void
This function is called when layer items are rendered. It uses the D3 force layout simulation to arrange the connections.
Parameters
• animateOptions: IDataChangeAnimateOptions= undefined
Returns
void
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:392
setEnabled()
setEnabled(
enabled):void
It changes layer state to enabled/disabled.
Parameters
• enabled: boolean
Returns
void
Implementation of
IConnectionLayerTool.setEnabled
Inherited from
Source
model/internal/layer/AbstractLayerTool.ts:102
setProps()
protectedsetProps(props):void
It updates the props.
Parameters
• props: IMapObjectProps
Returns
void
Inherited from
Source
model/internal/object/MapObject.ts:38
showLayerItems()
protectedshowLayerItems():void
Help function which shows layer items.
This function is meant to be private.
Returns
void
Inherited from
AbstractLayerTool.showLayerItems
Source
model/internal/layer/AbstractLayerTool.ts:126
switchEnabled()
switchEnabled():
void
Help function which switches enabled state (enabled/disabled).
Do not override this function. Use setEnabled instead.
Returns
void
Implementation of
IConnectionLayerTool.switchEnabled
Inherited from
AbstractLayerTool.switchEnabled
Source
model/internal/tool/MapTool.ts:158
updateData()
protectedupdateData():object
It prepares data for connections.
Returns
object
connections
connections:
Map\<string,IMapAggregationBucket>
nodes
nodes:
Set\<string>
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:231
updateDimension()
updateDimension(
dimension,value,renderType):void
It updates the dimension.
Parameters
• dimension: IMapDimension\<unknown>
• value: string
• renderType: undefined | number
Returns
void
Implementation of
IConnectionLayerTool.updateDimension
Overrides
AbstractLayerTool.updateDimension
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:607
updateStyle()
protectedupdateStyle():void
Help method which updates styles
Returns
void
Source
tools/layers/connection/model/internal/tool/ConnectionLayerTool.ts:566