|
|
@ -72,7 +72,9 @@ export default function MeasureAction() { |
|
|
|
console.log(report); |
|
|
|
// 更新 canvas 的分析数据
|
|
|
|
if (report && report.angleAnalysisList) { |
|
|
|
const analysisData: AnalysisData[] = report.angleAnalysisList.map(item => ({ |
|
|
|
// 先过滤掉 distance 为 null 的数据
|
|
|
|
const validItems = report.angleAnalysisList.filter(item => item.distance !== null); |
|
|
|
const analysisData: AnalysisData[] = validItems.map(item => ({ |
|
|
|
pointA: { x: parseFloat(item.pointA.x), y: parseFloat(item.pointA.y) }, |
|
|
|
pointB: { x: parseFloat(item.pointB.x), y: parseFloat(item.pointB.y) }, |
|
|
|
base: { x: parseFloat(item.pointA.x), y: parseFloat(item.pointA.y) }, |
|
|
@ -90,6 +92,7 @@ export default function MeasureAction() { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 开始/重新测量按钮点击事件
|
|
|
|
const onStart = () => { |
|
|
|
if (startBtnText === "新测量") { |
|
|
|