diff --git a/src/components/map/Map.js b/src/components/map/Map.js index f6cba4f..3ef9c89 100644 --- a/src/components/map/Map.js +++ b/src/components/map/Map.js @@ -58,6 +58,7 @@ function Map({ }, measure: { type: "chebyshev", + scale: "5ft", }, }); diff --git a/src/components/map/MapMeasure.js b/src/components/map/MapMeasure.js index 5ca4678..0288e6b 100644 --- a/src/components/map/MapMeasure.js +++ b/src/components/map/MapMeasure.js @@ -21,6 +21,12 @@ function MapMeasure({ selectedToolSettings, active, gridSize }) { const [drawingShapeData, setDrawingShapeData] = useState(null); const [isBrushDown, setIsBrushDown] = useState(false); + const toolScale = + active && selectedToolSettings.scale.match(/(\d*)([a-zA-Z]*)/); + const toolMultiplier = + active && !isNaN(parseInt(toolScale[1])) ? parseInt(toolScale[1]) : 1; + const toolUnit = active && toolScale[2]; + useEffect(() => { if (!active) { return; @@ -126,7 +132,9 @@ function MapMeasure({ selectedToolSettings, active, gridSize }) { > onSettingChange({ type: tool.id })} /> + + + Scale: + + onSettingChange({ scale: e.target.value })} + autoComplete="off" + /> ); }