Skip to content

Commit 4984970

Browse files
committed
docs: allow layer type to be an arbitrary string so mask layers may be grouped freely
1 parent 9b85c7f commit 4984970

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/types/layer.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export interface LayerConfigurationOptionLayers {
2525
title?: boolean | Record<string, string>
2626
}
2727

28-
// TODO: It should be allowed to set LayerType to a random string to allow for the grouping of different mask layers
29-
export type LayerType = 'background' | 'mask'
28+
export type LayerType = 'background' | 'mask' | (string & {})
3029

3130
export interface LayerConfigurationOptions {
3231
/**
@@ -73,7 +72,9 @@ export interface LayerConfiguration {
7372
name: string
7473

7574
/**
76-
* Whether the layer is a background layer or a feature layer with specific information.
75+
* Type of layer. Can be background layer, a feature ('mask') layer with
76+
* specific information, or any custom string for grouping different mask layers.
77+
* Custom strings allow for the categorization of layers into arbitrary groups.
7778
*/
7879
type: LayerType
7980

0 commit comments

Comments
 (0)