Changes to selection target now re-render the editor widgets (#34)
This commit is contained in:
parent
6d8e0bdb60
commit
432ca90cb4
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in New Issue