Fix note and token text size on visible change
This commit is contained in:
parent
b9ce0fd03d
commit
6216d3f813
@ -150,7 +150,7 @@ function Note({
|
||||
}
|
||||
|
||||
findFontSize();
|
||||
}, [note, note.text, noteWidth, noteHeight, notePadding]);
|
||||
}, [note, note.text, note.visible, noteWidth, noteHeight, notePadding]);
|
||||
|
||||
const textRef = useRef();
|
||||
|
||||
|
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user