From c33eaadd6355f774df30cf1535c37c2d2635949b Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Wed, 28 Feb 2024 10:49:36 +0800 Subject: [PATCH] Revert "1" This reverts commit 858e2ff33db2ceb6c95a50145a9a0932d6d98102. --- src/components/map_tools/map.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/map_tools/map.js b/src/components/map_tools/map.js index af41e9b..b539991 100644 --- a/src/components/map_tools/map.js +++ b/src/components/map_tools/map.js @@ -336,18 +336,14 @@ const addEntity = (id, name, lon, lat, height) => { export const handleViewAlarm = (alarm, userList) => { const canvas = document.createElement("canvas"); - const width = 100; - const height = 30; - canvas.width = width; - canvas.height = height; + canvas.width = 100; + canvas.height = 30; const ctx = canvas.getContext("2d"); ctx.fillStyle = "#000000"; ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = "#ff0000"; ctx.font = "normal bold 20px Arial"; - ctx.textAlign = "center"; - ctx.textBaseline = "middle"; - ctx.fillText("聚集告警", width / 2, height / 2); + ctx.fillText("聚集告警", 5, 15); // 聚集圆锥特效 const Cone = new window.CustomCesium.Cone(window.$icy);