From 91c95b4fad715353ae9227d46cb78f6a16db1592 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 20 Apr 2020 13:03:54 +1000 Subject: [PATCH] Added prevention from drawing single point shapes --- src/components/MapDrawing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MapDrawing.js b/src/components/MapDrawing.js index b806bc2..980c425 100644 --- a/src/components/MapDrawing.js +++ b/src/components/MapDrawing.js @@ -71,7 +71,7 @@ function MapDrawing({ } setIsDrawing(false); if (selectedTool === "brush") { - if (brushPoints.length > 0) { + if (brushPoints.length > 1) { const simplifiedPoints = simplify(brushPoints, 0.001); onShapeAdd({ id: shortid.generate(),