From 8e8e8007608b463f633367159b91b3eb001c43be Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 17 Jul 2021 20:37:09 +1000 Subject: [PATCH] Fix resize detector sizes --- src/components/dice/DiceInteraction.tsx | 7 ++++++- src/components/map/MapEditor.tsx | 7 ++++++- src/components/map/MapInteraction.tsx | 7 ++++++- src/components/tile/TilesOverlay.tsx | 5 ++++- src/components/token/TokenPreview.tsx | 7 ++++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/components/dice/DiceInteraction.tsx b/src/components/dice/DiceInteraction.tsx index 416acae..2b66656 100644 --- a/src/components/dice/DiceInteraction.tsx +++ b/src/components/dice/DiceInteraction.tsx @@ -192,7 +192,12 @@ function DiceInteraction({ }} ref={containerRef} > - + - + ( - + ( (null); const [containerSize, setContinerSize] = useState({ width: 0, height: 0 }); function handleContainerResize(width?: number, height?: number) { if (width && height) { @@ -76,11 +77,13 @@ function TilesOverlay({ modalSize, children }: TilesOverlayProps) { top: 0, }} bg="overlay" + ref={containerRef} /> - +