Added height and width check to resize handle

This commit is contained in:
Mitchell McCaffrey 2020-12-05 17:16:31 +11:00
parent f2cb8b69db
commit b7da0cffa7

View File

@ -51,8 +51,10 @@ function MapInteraction({
const mapImageRef = useRef(); const mapImageRef = useRef();
function handleResize(width, height) { function handleResize(width, height) {
setStageWidth(width); if (width > 0 && height > 0) {
setStageHeight(height); setStageWidth(width);
setStageHeight(height);
}
} }
const containerRef = useRef(); const containerRef = useRef();