Universal Layer Manager
GitHub
Simple Example
Leaflet Example
Preparing search index...
createLayerManagerMachine
Function createLayerManagerMachine
createLayerManagerMachine
<
TLayer
,
TGroup
=
TLayer
>
()
:
StateMachine
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
{
[
key
:
string
]:
|
ActorRefFromLogic
<
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
(...)
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
(...)
,
(...)
>
,
)
:
ActorRefFromLogic
<
(...)
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
(...)
,
(...)
>
;
layerId
:
string
;
parentRef
:
(...)
|
(...)
;
layerName
:
string
;
listMode
?:
(...)
|
(...)
|
(...)
;
opacity
?:
(...)
|
(...)
;
timeInfo
?:
(...)
|
(...)
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
...
;
entry
:
...
;
exit
:
...
;
on
:
...
}
;
hidden
:
{
description
:
...
;
on
:
...
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
...
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
...
}
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
...
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
}
;
}
,
>
,
>
,
>
|
ActorRefFromLogic
<
StateMachine
<
LayerGroupContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"CHILD.VISIBLE"
;
layerId
:
string
}
|
{
type
:
"LAYERS.ADD_CHILD"
;
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
|
{
type
:
"LAYERS.REMOVE_CHILD"
;
id
:
string
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TGroup
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify children of visibility change"
:
{
visible
:
boolean
}
;
"Notify children of opacity change"
:
NonReducibleUnknown
;
"Notify Parent of visibility change"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Change Layer Data"
:
{
layerData
:
TGroup
}
;
"Update Computed Opacity"
:
NonReducibleUnknown
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Update Children"
:
{
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
;
"Remove Child"
:
{
id
:
string
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerGroup"
;
description
:
"A machine that represents a collection of layers that can be toggled as a group"
;
initial
:
"disabled"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
(...)
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
(...)
,
(...)
>
,
)
:
ActorRefFromLogic
<
(...)
>
;
}
;
input
:
{
layerId
:
string
;
parentRef
:
(...)
|
(...)
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
(...)
,
(...)
>
;
listMode
?:
(...)
|
(...)
|
(...)
|
(...)
;
timeInfo
?:
(...)
|
(...)
;
opacity
?:
(...)
|
(...)
;
layerData
:
TGroup
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
children
:
never
[]
;
childLayerOrder
:
never
[]
;
layerName
:
string
;
layerType
:
"layerGroup"
;
listMode
:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TGroup
;
opacity
:
number
;
computedOpacity
:
number
;
}
;
states
:
{
enabled
:
{
initial
:
"visible"
;
description
:
"The layer group is enabled"
;
states
:
{
visible
:
{
description
:
...
;
entry
:
...
;
exit
:
...
;
on
:
...
}
;
hidden
:
{
description
:
...
;
on
:
...
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
...
}
}
;
}
;
disabled
:
{
description
:
"The layer group is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
...
}
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
...
}
;
"CHILD.VISIBLE"
:
{
target
:
...
}
;
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
"Update Computed Opacity"
}
;
"CHILD.VISIBLE"
:
{
actions
:
"Notify Parent of visibility change"
}
;
"LAYERS.ADD_CHILD"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYERS.REMOVE_CHILD"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
}
;
}
,
>
,
>
,
>
|
undefined
;
}
,
ToProvidedActor
<
{}
,
{
layerMachineEnabledVisible
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerMachineEnabledHidden
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerMachineDisabled
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerGroupMachine
:
StateMachine
<
LayerGroupContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"CHILD.VISIBLE"
;
layerId
:
string
}
|
{
type
:
"LAYERS.ADD_CHILD"
;
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
|
{
type
:
"LAYERS.REMOVE_CHILD"
;
id
:
string
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TGroup
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify children of visibility change"
:
{
visible
:
boolean
}
;
"Notify children of opacity change"
:
NonReducibleUnknown
;
"Notify Parent of visibility change"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Change Layer Data"
:
{
layerData
:
TGroup
}
;
"Update Computed Opacity"
:
NonReducibleUnknown
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Update Children"
:
{
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
;
"Remove Child"
:
{
id
:
string
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerGroup"
;
description
:
"A machine that represents a collection of layers that can be toggled as a group"
;
initial
:
"disabled"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerGroupContext
<
(...)
,
(...)
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerId
:
...
}
|
{
type
:
...
;
child
:
...
;
index
?:
...
;
position
?:
...
}
|
{
type
:
...
;
id
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
children
:
never
[]
;
childLayerOrder
:
never
[]
;
layerName
:
string
;
layerType
:
"layerGroup"
;
listMode
:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TGroup
;
opacity
:
number
;
computedOpacity
:
number
;
}
;
states
:
{
enabled
:
{
initial
:
"visible"
;
description
:
"The layer group is enabled"
;
states
:
{
visible
:
{
description
:
"The layer group should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
,
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer group should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer group is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer group and its children always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled"
}
;
"CHILD.VISIBLE"
:
{
target
:
"enabled"
}
;
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
"Update Computed Opacity"
}
;
"CHILD.VISIBLE"
:
{
actions
:
"Notify Parent of visibility change"
}
;
"LAYERS.ADD_CHILD"
:
{
actions
:
readonly
[
{
type
:
"Update Children"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYERS.REMOVE_CHILD"
:
{
actions
:
readonly
[
{
type
:
"Remove Child"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
}
,
>
,
ToParameterizedObject
<
{
"Add new layer"
:
AddLayerParams
<
TLayer
,
TGroup
>
;
"Remove layer"
:
{
layerId
:
string
}
;
"Emit update layer order"
:
NonReducibleUnknown
;
"Reset layer manager"
:
NonReducibleUnknown
;
}
,
>
,
{
type
:
"isValidLayerConfig"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
,
never
,
{}
,
string
,
{
allowNestedGroupLayers
:
boolean
}
,
NonReducibleUnknown
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerManager"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
|
"layerMachineEnabledVisible"
|
"layerMachineEnabledHidden"
|
"layerMachineDisabled"
|
"layerGroupMachine"
,
>
(
logic
:
TSrc
,
...
__namedParameters
:
|
SpawnOptions
<
{
src
:
"layerMachineEnabledVisible"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerMachineEnabledHidden"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerMachineDisabled"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerGroupMachine"
;
logic
:
StateMachine
<
LayerGroupContext
<
(...)
,
(...)
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
layerManagerRef
:
...
;
listMode
?:
...
;
timeInfo
?:
...
;
opacity
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
,
)
:
ActorRefFromLogic
<
GetConcreteByKey
<
ToProvidedActor
<
{}
,
{
layerMachineEnabledVisible
:
...
;
layerMachineEnabledHidden
:
...
;
layerMachineDisabled
:
...
;
layerGroupMachine
:
...
;
}
,
>
,
"src"
,
TSrc
,
>
[
"logic"
]
,
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
{
id
?:
...
;
systemId
?:
...
;
input
?:
...
;
syncSnapshot
?:
...
;
}
&
{
[
K
in
(...)
]
:
(...)
}
,
]
,
IsNotNever
<
RequiredLogicInput
<
TLogic
>
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
allowNestedGroupLayers
:
boolean
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
Record
<
string
,
AnyActorRef
|
undefined
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layers
:
never
[]
;
childLayerOrder
:
never
[]
;
allowNestedGroupLayers
:
boolean
;
}
;
on
:
{
"LAYER.UPDATE_VISIBILITY"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.UPDATE_OPACITY"
:
{
actions
:
readonly
[
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
,
]
;
}
;
"LAYER.UPDATE_TIME_INFO"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.UPDATE_LAYER_DATA"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.ADD"
:
{
guard
:
{
type
:
"isValidLayerConfig"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
;
}
,
)
=>
AddLayerParams
<
TLayer
,
TGroup
>
;
}
;
actions
:
readonly
[
{
type
:
"Add new layer"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
(...)
,
(...)
>
}
;
}
,
)
=>
AddLayerParams
<
TLayer
,
TGroup
>
;
}
,
{
type
:
"Emit update layer order"
}
,
]
;
}
;
"LAYER.REMOVE"
:
{
actions
:
readonly
[
{
type
:
"Remove layer"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
;
}
,
)
=>
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
;
}
,
{
type
:
"Emit update layer order"
}
,
]
;
}
;
RESET
:
{
actions
:
readonly
[
"Reset layer manager"
]
}
;
}
;
}
,
>
,
>
Type Parameters
TLayer
TGroup
=
TLayer
Returns
StateMachine
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
{
[
key
:
string
]:
|
ActorRefFromLogic
<
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
(...)
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
(...)
,
(...)
>
,
)
:
ActorRefFromLogic
<
(...)
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
(...)
,
(...)
>
;
layerId
:
string
;
parentRef
:
(...)
|
(...)
;
layerName
:
string
;
listMode
?:
(...)
|
(...)
|
(...)
;
opacity
?:
(...)
|
(...)
;
timeInfo
?:
(...)
|
(...)
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
...
;
entry
:
...
;
exit
:
...
;
on
:
...
}
;
hidden
:
{
description
:
...
;
on
:
...
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
...
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
...
}
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
...
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
}
;
}
,
>
,
>
,
>
|
ActorRefFromLogic
<
StateMachine
<
LayerGroupContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"CHILD.VISIBLE"
;
layerId
:
string
}
|
{
type
:
"LAYERS.ADD_CHILD"
;
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
|
{
type
:
"LAYERS.REMOVE_CHILD"
;
id
:
string
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TGroup
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify children of visibility change"
:
{
visible
:
boolean
}
;
"Notify children of opacity change"
:
NonReducibleUnknown
;
"Notify Parent of visibility change"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Change Layer Data"
:
{
layerData
:
TGroup
}
;
"Update Computed Opacity"
:
NonReducibleUnknown
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Update Children"
:
{
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
;
"Remove Child"
:
{
id
:
string
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerGroup"
;
description
:
"A machine that represents a collection of layers that can be toggled as a group"
;
initial
:
"disabled"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
(...)
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
(...)
,
(...)
>
,
)
:
ActorRefFromLogic
<
(...)
>
;
}
;
input
:
{
layerId
:
string
;
parentRef
:
(...)
|
(...)
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
(...)
,
(...)
>
;
listMode
?:
(...)
|
(...)
|
(...)
|
(...)
;
timeInfo
?:
(...)
|
(...)
;
opacity
?:
(...)
|
(...)
;
layerData
:
TGroup
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
(...)
,
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
children
:
never
[]
;
childLayerOrder
:
never
[]
;
layerName
:
string
;
layerType
:
"layerGroup"
;
listMode
:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TGroup
;
opacity
:
number
;
computedOpacity
:
number
;
}
;
states
:
{
enabled
:
{
initial
:
"visible"
;
description
:
"The layer group is enabled"
;
states
:
{
visible
:
{
description
:
...
;
entry
:
...
;
exit
:
...
;
on
:
...
}
;
hidden
:
{
description
:
...
;
on
:
...
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
...
}
}
;
}
;
disabled
:
{
description
:
"The layer group is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
...
}
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
...
}
;
"CHILD.VISIBLE"
:
{
target
:
...
}
;
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
"Update Computed Opacity"
}
;
"CHILD.VISIBLE"
:
{
actions
:
"Notify Parent of visibility change"
}
;
"LAYERS.ADD_CHILD"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYERS.REMOVE_CHILD"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
...
;
params
:
...
}
]
;
}
;
}
;
}
,
>
,
>
,
>
|
undefined
;
}
,
ToProvidedActor
<
{}
,
{
layerMachineEnabledVisible
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerMachineEnabledHidden
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerMachineDisabled
:
StateMachine
<
LayerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TLayer
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify Parent that layer is visible"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Update Computed Opacity"
:
{
opacity
:
number
}
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Change Layer Data"
:
{
layerData
:
TLayer
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layer"
;
description
:
"A machine that represents a layer on the map."
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
listMode
?:
"hide"
|
"show"
;
opacity
?:
number
;
timeInfo
?:
LayerTimeInfo
;
layerData
:
TLayer
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
parentRef
:
ParentLayerActor
|
null
;
layerId
:
string
;
layerName
:
string
;
listMode
:
"hide"
|
"show"
;
opacity
:
number
;
computedOpacity
:
number
;
layerType
:
"layer"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TLayer
;
}
;
initial
:
"disabled"
|
"enabled"
;
states
:
{
enabled
:
{
initial
:
"hidden"
|
"visible"
;
description
:
"The layer is enabled"
;
states
:
{
visible
:
{
description
:
"The layer should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer should always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled.visible"
}
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
readonly
[
{
type
:
"Update Computed Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
layerGroupMachine
:
StateMachine
<
LayerGroupContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.ENABLED"
}
|
{
type
:
"LAYER.DISABLED"
}
|
{
type
:
"PARENT.VISIBLE"
}
|
{
type
:
"PARENT.HIDDEN"
}
|
{
type
:
"PARENT.OPACITY_CHANGED"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_OPACITY"
;
opacity
:
number
}
|
{
type
:
"LAYER.SET_TIME_INFO"
;
timeInfo
:
LayerTimeInfo
}
|
{
type
:
"CHILD.VISIBLE"
;
layerId
:
string
}
|
{
type
:
"LAYERS.ADD_CHILD"
;
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
|
{
type
:
"LAYERS.REMOVE_CHILD"
;
id
:
string
}
|
{
type
:
"LAYER.SET_LAYER_DATA"
;
layerData
:
TGroup
}
,
{}
,
never
,
ToParameterizedObject
<
{
"Notify children of visibility change"
:
{
visible
:
boolean
}
;
"Notify children of opacity change"
:
NonReducibleUnknown
;
"Notify Parent of visibility change"
:
NonReducibleUnknown
;
"Notify Manager of visibility change"
:
{
visible
:
boolean
}
;
"Change Layer Data"
:
{
layerData
:
TGroup
}
;
"Update Computed Opacity"
:
NonReducibleUnknown
;
"Change Layer Opacity"
:
{
opacity
:
number
}
;
"Change Layer Time Info"
:
{
timeInfo
:
LayerTimeInfo
}
;
"Update Children"
:
{
child
:
ChildLayerActor
;
index
?:
number
;
position
?:
"top"
|
"bottom"
;
}
;
"Remove Child"
:
{
id
:
string
}
;
}
,
>
,
never
,
never
,
{
disabled
:
"hidden"
}
|
{
enabled
:
"hidden"
|
"visible"
}
,
string
,
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerGroup"
;
description
:
"A machine that represents a collection of layers that can be toggled as a group"
;
initial
:
"disabled"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
never
>
(
logic
:
TSrc
,
...
__namedParameters
:
never
,
)
:
ActorRefFromLogic
<
never
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
...
]
,
IsNotNever
<
(...)
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
layerName
:
string
;
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
listMode
?:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
?:
LayerTimeInfo
;
opacity
?:
number
;
layerData
:
TGroup
;
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerGroupContext
<
(...)
,
(...)
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
Record
<
(...)
,
(...)
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
opacity
:
...
}
|
{
type
:
...
;
timeInfo
:
...
}
|
{
type
:
...
;
layerId
:
...
}
|
{
type
:
...
;
child
:
...
;
index
?:
...
;
position
?:
...
}
|
{
type
:
...
;
id
:
...
}
|
{
type
:
...
;
layerData
:
...
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layerManagerRef
:
LayerManager
<
TLayer
,
TGroup
>
;
layerId
:
string
;
parentRef
:
ParentLayerActor
|
null
;
children
:
never
[]
;
childLayerOrder
:
never
[]
;
layerName
:
string
;
layerType
:
"layerGroup"
;
listMode
:
"hide"
|
"show"
|
"hide-children"
;
timeInfo
:
LayerTimeInfo
|
undefined
;
layerData
:
TGroup
;
opacity
:
number
;
computedOpacity
:
number
;
}
;
states
:
{
enabled
:
{
initial
:
"visible"
;
description
:
"The layer group is enabled"
;
states
:
{
visible
:
{
description
:
"The layer group should appear visible on the map"
;
entry
:
readonly
[
(...)
,
(...)
,
(...)
]
;
exit
:
readonly
[
(...)
,
(...)
]
;
on
:
{
"PARENT.HIDDEN"
:
...
}
;
}
;
hidden
:
{
description
:
"The layer group should appear hidden on the map as its parent is hidden"
;
on
:
{
"PARENT.VISIBLE"
:
...
}
;
}
;
}
;
on
:
{
"LAYER.DISABLED"
:
{
target
:
"disabled"
}
}
;
}
;
disabled
:
{
description
:
"The layer group is disabled"
;
initial
:
"hidden"
;
states
:
{
hidden
:
{
description
:
"The layer group and its children always appear hidden on the map"
;
}
;
}
;
on
:
{
"LAYER.ENABLED"
:
{
target
:
"enabled"
}
;
"CHILD.VISIBLE"
:
{
target
:
"enabled"
}
;
}
;
}
;
}
;
on
:
{
"PARENT.OPACITY_CHANGED"
:
{
actions
:
"Update Computed Opacity"
}
;
"CHILD.VISIBLE"
:
{
actions
:
"Notify Parent of visibility change"
}
;
"LAYERS.ADD_CHILD"
:
{
actions
:
readonly
[
{
type
:
"Update Children"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYERS.REMOVE_CHILD"
:
{
actions
:
readonly
[
{
type
:
"Remove Child"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_LAYER_DATA"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Data"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_OPACITY"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Opacity"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
"LAYER.SET_TIME_INFO"
:
{
actions
:
readonly
[
{
type
:
"Change Layer Time Info"
;
params
:
(
__namedParameters
:
...
)
=>
...
;
}
,
]
;
}
;
}
;
}
,
>
,
>
;
}
,
>
,
ToParameterizedObject
<
{
"Add new layer"
:
AddLayerParams
<
TLayer
,
TGroup
>
;
"Remove layer"
:
{
layerId
:
string
}
;
"Emit update layer order"
:
NonReducibleUnknown
;
"Reset layer manager"
:
NonReducibleUnknown
;
}
,
>
,
{
type
:
"isValidLayerConfig"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
,
never
,
{}
,
string
,
{
allowNestedGroupLayers
:
boolean
}
,
NonReducibleUnknown
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
MetaObject
,
ToStateSchema
<
{
id
:
"layerManager"
;
context
:
(
__namedParameters
:
{
spawn
:
{
<
TSrc
extends
|
"layerMachineEnabledVisible"
|
"layerMachineEnabledHidden"
|
"layerMachineDisabled"
|
"layerGroupMachine"
,
>
(
logic
:
TSrc
,
...
__namedParameters
:
|
SpawnOptions
<
{
src
:
"layerMachineEnabledVisible"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerMachineEnabledHidden"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerMachineDisabled"
;
logic
:
StateMachine
<
LayerContext
<
(...)
,
(...)
>
,
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerManagerRef
:
...
;
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
listMode
?:
...
;
opacity
?:
...
;
timeInfo
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
|
SpawnOptions
<
{
src
:
"layerGroupMachine"
;
logic
:
StateMachine
<
LayerGroupContext
<
(...)
,
(...)
>
,
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
|
(...)
,
{}
,
never
,
ToParameterizedObject
<
(...)
>
,
never
,
never
,
(...)
|
(...)
,
string
,
{
layerId
:
...
;
parentRef
:
...
;
layerName
:
...
;
layerManagerRef
:
...
;
listMode
?:
...
;
timeInfo
?:
...
;
opacity
?:
...
;
layerData
:
...
;
}
,
NonReducibleUnknown
,
EventObject
,
MetaObject
,
ToStateSchema
<
(...)
>
,
>
;
id
:
string
|
undefined
;
}
,
TSrc
,
>
,
)
:
ActorRefFromLogic
<
GetConcreteByKey
<
ToProvidedActor
<
{}
,
{
layerMachineEnabledVisible
:
...
;
layerMachineEnabledHidden
:
...
;
layerMachineDisabled
:
...
;
layerGroupMachine
:
...
;
}
,
>
,
"src"
,
TSrc
,
>
[
"logic"
]
,
>
;
<
TLogic
extends
AnyActorLogic
>
(
src
:
TLogic
,
...
__namedParameters
:
ConditionalRequired
<
[
options
?:
{
id
?:
...
;
systemId
?:
...
;
input
?:
...
;
syncSnapshot
?:
...
;
}
&
{
[
K
in
(...)
]
:
(...)
}
,
]
,
IsNotNever
<
RequiredLogicInput
<
TLogic
>
>
,
>
,
)
:
ActorRefFromLogic
<
TLogic
>
;
}
;
input
:
{
allowNestedGroupLayers
:
boolean
}
;
self
:
ActorRef
<
MachineSnapshot
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
Record
<
string
,
AnyActorRef
|
undefined
>
,
StateValue
,
string
,
unknown
,
any
,
any
,
>
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
AnyEventObject
,
>
;
}
,
)
=>
{
layers
:
never
[]
;
childLayerOrder
:
never
[]
;
allowNestedGroupLayers
:
boolean
;
}
;
on
:
{
"LAYER.UPDATE_VISIBILITY"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.UPDATE_OPACITY"
:
{
actions
:
readonly
[
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
,
]
;
}
;
"LAYER.UPDATE_TIME_INFO"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.UPDATE_LAYER_DATA"
:
{
actions
:
ActionFunction
<
LayerManagerContext
<
TLayer
,
TGroup
>
,
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
|
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
|
{
type
:
"LAYER.UPDATE_VISIBILITY"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.UPDATE_OPACITY"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.UPDATE_TIME_INFO"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"RESET"
}
|
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
|
{
type
:
"LAYER.UPDATE_LAYER_DATA"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
undefined
,
never
,
never
,
never
,
never
,
|
{
type
:
"LAYER.ADDED"
;
layerId
:
string
;
visible
:
boolean
}
|
{
type
:
"LAYER.REMOVED"
;
layerId
:
string
}
|
{
type
:
"LAYER.ORDER_CHANGED"
;
layerOrder
:
string
[]
}
|
{
type
:
"LAYER.VISIBILITY_CHANGED"
;
layerId
:
string
;
visible
:
boolean
;
}
|
{
type
:
"LAYER.OPACITY_CHANGED"
;
layerId
:
string
;
opacity
:
number
;
computedOpacity
:
number
;
}
|
{
type
:
"LAYER.TIME_INFO_CHANGED"
;
layerId
:
string
;
timeInfo
:
LayerTimeInfo
;
}
|
{
type
:
"LAYER.LAYER_DATA_CHANGED"
;
layerId
:
string
;
layerData
:
TLayer
|
TGroup
;
}
,
>
;
}
;
"LAYER.ADD"
:
{
guard
:
{
type
:
"isValidLayerConfig"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
TLayer
,
TGroup
>
}
;
}
,
)
=>
AddLayerParams
<
TLayer
,
TGroup
>
;
}
;
actions
:
readonly
[
{
type
:
"Add new layer"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.ADD"
;
params
:
AddLayerParams
<
(...)
,
(...)
>
}
;
}
,
)
=>
AddLayerParams
<
TLayer
,
TGroup
>
;
}
,
{
type
:
"Emit update layer order"
}
,
]
;
}
;
"LAYER.REMOVE"
:
{
actions
:
readonly
[
{
type
:
"Remove layer"
;
params
:
(
__namedParameters
:
{
context
:
LayerManagerContext
;
event
:
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
;
}
,
)
=>
{
type
:
"LAYER.REMOVE"
;
layerId
:
string
}
;
}
,
{
type
:
"Emit update layer order"
}
,
]
;
}
;
RESET
:
{
actions
:
readonly
[
"Reset layer manager"
]
}
;
}
;
}
,
>
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Home
GitHub
Simple Example
Leaflet Example
Universal Layer Manager
Loading...