Skip to main content

Interface: UseOpacity

Properties​

isEnabled​

• isEnabled: boolean

Returns false if there are multiple items selected or if the selected item is locked or if it cannot access the ItemOpacityExtension

Defined in​

packages/design-engine-react-components/src/hooks/useOpacity/useOpacity.ts:12


onChange​

• Optional onChange: (value: number) => void

Type declaration​

▸ (value): void

A callback to set an uncommited value in state for opacityMultiplier, to enable interactions

Parameters​
NameType
valuenumber
Returns​

void

Defined in​

packages/design-engine-react-components/src/hooks/useOpacity/useOpacity.ts:22


onCommit​

• Optional onCommit: () => void

Type declaration​

▸ (): void

A callback to commit the value on the Cimdoc item

Returns​

void

Defined in​

packages/design-engine-react-components/src/hooks/useOpacity/useOpacity.ts:26


opacity​

• Optional opacity: number

Returns uncommited value for opacityMultiplier on the state if any, or the value on the model.

Defaults to 1 if it is undefined on the cimdoc item.

Defined in​

packages/design-engine-react-components/src/hooks/useOpacity/useOpacity.ts:18