Added prevention from drawing single point shapes

This commit is contained in:
Mitchell McCaffrey 2020-04-20 13:03:54 +10:00
parent f5d1cdf60f
commit 91c95b4fad

View File

@ -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(),