mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
fixed sticker mode change
This commit is contained in:
parent
60b8fd51a2
commit
8e0a4c6df6
3 changed files with 6 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue