Fix UseFitOnce
This commit is contained in:
parent
f6953e42df
commit
cae628537c
1 changed files with 3 additions and 1 deletions
|
@ -124,8 +124,10 @@ export function SVG(props: ISVGProps): JSX.Element {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
function UseFitOnce(svgViewer: React.RefObject<ReactSVGPanZoom>) {
|
||||
|
||||
function UseFitOnce(svgViewer: React.RefObject<ReactSVGPanZoom>): void {
|
||||
React.useEffect(() => {
|
||||
svgViewer?.current?.fitToViewer();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue