|
@@ -1,6 +1,11 @@
|
|
|
import { getFont, Pen } from "@meta2d/core";
|
|
|
import { MonitoringPointData } from "@/types";
|
|
|
|
|
|
+const isPointNormal = (point: MonitoringPointData) => {
|
|
|
+ const { temperature, humidity } = point;
|
|
|
+ return temperature !== null && humidity !== null
|
|
|
+}
|
|
|
+
|
|
|
export interface MonitorPointPen extends Pen {
|
|
|
monitorPointInfo: MonitoringPointData
|
|
|
}
|
|
@@ -12,7 +17,7 @@ export function monitorPoint(
|
|
|
const { x, y, width, height } = pen.calculative.worldRect;
|
|
|
const { name, temperature, humidity } = pen.monitorPointInfo;
|
|
|
const isLock = meta2d.data().locked;
|
|
|
- const isNormal = true;
|
|
|
+ const isNormal = isPointNormal(pen.monitorPointInfo);
|
|
|
ctx.save();
|
|
|
|
|
|
// 状态图标中心坐标
|