Added alternating diagonals map measurement

This commit is contained in:
Mitchell McCaffrey
2020-11-20 12:00:59 +11:00
parent c338af5557
commit 4c301604fc
4 changed files with 38 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import ToolSection from "./ToolSection";
import MeasureChebyshevIcon from "../../../icons/MeasureChebyshevIcon";
import MeasureEuclideanIcon from "../../../icons/MeasureEuclideanIcon";
import MeasureManhattanIcon from "../../../icons/MeasureManhattanIcon";
import MeasureAlternatingIcon from "../../../icons/MeasureAlternatingIcon";
import Divider from "../../Divider";
@@ -19,6 +20,8 @@ function MeasureToolSettings({ settings, onSettingChange }) {
onSettingChange({ type: "euclidean" });
} else if (key === "c") {
onSettingChange({ type: "manhattan" });
} else if (key === "a") {
onSettingChange({ type: "alternating" });
}
}
@@ -31,6 +34,12 @@ function MeasureToolSettings({ settings, onSettingChange }) {
isSelected: settings.type === "chebyshev",
icon: <MeasureChebyshevIcon />,
},
{
id: "alternating",
title: "Alternating Diagonal Distance (A)",
isSelected: settings.type === "alternating",
icon: <MeasureAlternatingIcon />,
},
{
id: "euclidean",
title: "Line Distance (L)",