From b7da0cffa734658d7b00cd2cb1b6fce77a8753c2 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 5 Dec 2020 17:16:31 +1100 Subject: [PATCH] Added height and width check to resize handle --- src/components/map/MapInteraction.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/map/MapInteraction.js b/src/components/map/MapInteraction.js index 13e40d7..0e4c377 100644 --- a/src/components/map/MapInteraction.js +++ b/src/components/map/MapInteraction.js @@ -51,8 +51,10 @@ function MapInteraction({ const mapImageRef = useRef(); function handleResize(width, height) { - setStageWidth(width); - setStageHeight(height); + if (width > 0 && height > 0) { + setStageWidth(width); + setStageHeight(height); + } } const containerRef = useRef();