diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 64a7a80..da365a8 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -38,6 +38,11 @@ const Editor = props => { } }, [ bounds(props.selectedElement) ]); + useEffect(() => { + if (currentAnnotation) + setCurrentAnnotation(currentAnnotation.clone({ target: props.modifiedTarget })); + }, [ props.modifiedTarget ]) + const initResizeObserver = () => { if (window?.ResizeObserver) { const resizeObserver = new ResizeObserver(() => {