diff --git a/src/components/note/Note.js b/src/components/note/Note.js index 072e668..461d8b1 100644 --- a/src/components/note/Note.js +++ b/src/components/note/Note.js @@ -150,7 +150,7 @@ function Note({ } findFontSize(); - }, [note, note.text, noteWidth, noteHeight, notePadding]); + }, [note, note.text, note.visible, noteWidth, noteHeight, notePadding]); const textRef = useRef(); diff --git a/src/components/token/TokenLabel.js b/src/components/token/TokenLabel.js index 00aea92..e11918e 100644 --- a/src/components/token/TokenLabel.js +++ b/src/components/token/TokenLabel.js @@ -45,7 +45,15 @@ function TokenLabel({ tokenState, width, height }) { } findFontSize(); - }, [tokenState.label, width, height, tokenState, labelSize, paddingX]); + }, [ + tokenState.label, + tokenState.visible, + width, + height, + tokenState, + labelSize, + paddingX, + ]); const [rectWidth, setRectWidth] = useState(0); useEffect(() => {