The layers sidebar options allow to specify options available for the Layers sidebar.
Here you can define Currently, you can define a lockedLayers
array in which you
can provide an array of id
s for the layers for which visibility should not be modifieable
using the sidebar.
Properties:
Name | Type | Description |
---|---|---|
lockedLayers |
Array.<number> | Array of ocg.ocgId present in the document |
iconsAlignment |
PSPDFKit.Alignment | Alignment relative to the parent container |
Example
PSPDFKit.load({
initialViewState: new PSPDFKit.ViewState({
sidebarOptions: {
[PSPDFKit.SidebarMode.LAYERS]: {
LockedLayers: [],
iconsAlignment: PSPDFKit.Alignment.START
}
}
})
});