drawLayer
- Signature :
(stage: Stage) => void
redraw the shapes layer, the canvas on which we draw shapes. This method is useful to batch updates applied on shapes config.
How to get stage object ?
You can get the stage object using the getStage available on AnnotationViewer and AnnotationLens
#
Exampleconst stageObject = useRef()
const triggerLayerRedraw = () => { drawLayer(stageObject.current)}
return ( <AnnotationViewer getStage={getStage} // other props />)