- Add selection mask commands, shortcuts, context-menu access, and mask type controls - Add mixed-selection blend mode editing with single-step undo - Document the headless mask composable and localize the new controls
790 B
790 B
| title | description |
|---|---|
| useMask | Read and update mask state for the selected node. |
useMask
useMask() provides headless state and actions for mask controls in a property panel.
Usage
import { useMask } from '@open-pencil/vue'
const { active, maskType, setMaskType } = useMask()
activeistruewhen exactly one selected node is being used as a mask.maskTypeis the selected node'sALPHA,VECTOR, orLUMINANCEmask type.setMaskType(type)updates the active mask with undo support.
Use the selection.toggleMask editor command to turn masking on or off so toolbar, context-menu, and keyboard behavior stays consistent.