fixed sticker mode change

This commit is contained in:
Fedor Katurov 2020-01-22 12:15:40 +07:00
parent 60b8fd51a2
commit 8e0a4c6df6
3 changed files with 6 additions and 4 deletions

View file

@ -39,6 +39,7 @@ const Sticker: React.FC<IProps> = ({
let angle = useRef(sticker.angle);
const element = React.useMemo(() => document.createElement('div'), []);
const stickerArrow = React.useRef(null);
const stickerImage = React.useRef(null);
@ -197,7 +198,7 @@ const Sticker: React.FC<IProps> = ({
React.useEffect(() => {
element.className = is_editing ? 'sticker-container' : 'sticker-container inactive';
}, [element, is_editing]);
}, [element, is_editing, layer]);
return createPortal(
<React.Fragment>