Provides logical grouping of Element objects.
Layers are commonly used to group objects in the drawing by function (e.g. walls, furniture, etc.), but in principle they can represent any type of virtual grouping. All objects in a layer share appearance, can be shown and hidden together. A drawing element can only belong to one layer.
The drawing layer holds an isVisible attribute, which is true by default.
new Layer(
name?):Layer
string
Added name.
isVisible:
boolean=true
Indicates whether the drawing layer is visible or not.
get id():
bigint
Returns object id.
bigint
get name():
null|string
Returns name of the drawing layer. null if the drawing layer has no name (by default).
null | string
set name(
name):void
Sets name of the drawing layer.
Name of the drawing layer.
null | string
void
get uuid():
null| `$string