From cb99768a728002372bcb80885de2b4b2cd52e303 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 09 九月 2024 14:10:32 +0800
Subject: [PATCH] 1. 修复轨迹动画无法运行的问题

---
 src/model/Legend.js      |    3 +++
 src/model/Factor.js      |    2 +-
 src/utils/map/3dLayer.js |    5 ++---
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/model/Factor.js b/src/model/Factor.js
index 3af0452..28d65ce 100644
--- a/src/model/Factor.js
+++ b/src/model/Factor.js
@@ -127,7 +127,7 @@
     this.heights = [];
     this.colors = [];
     this.datas.forEach((d) => {
-      const h = getFactorHeight(d.factorId, d.factorData, [this.min, this.max]);
+      let h = getFactorHeight(d.factorId, d.factorData, [this.min, this.max]);
       if (d.factorData == -1) {
         h = -1;
       }
diff --git a/src/model/Legend.js b/src/model/Legend.js
index cf6d5b3..42abee3 100644
--- a/src/model/Legend.js
+++ b/src/model/Legend.js
@@ -193,6 +193,9 @@
     } else {
       colors = this._custom;
     }
+    if (colors == undefined) {
+      colors = this._legend_c['PM25'];
+    }
     let index = colors.indexOf(color);
     index--;
     if (index < 0) index = 0;
diff --git a/src/utils/map/3dLayer.js b/src/utils/map/3dLayer.js
index 5bf559a..419dd98 100644
--- a/src/utils/map/3dLayer.js
+++ b/src/utils/map/3dLayer.js
@@ -96,7 +96,7 @@
   const coors = fDatas.coors_GD;
   const heights = factor.heights;
   const colors = factor.colors;
-  const bColor = factor.bottomColor;
+  // const bColor = factor.bottomColor;
   const bColors = factor.bottomColors;
 
   // eslint-disable-next-line no-undef
@@ -173,9 +173,8 @@
    * @param fDatas 瀹屾暣鐩戞祴鏁版嵁
    * @param factor 褰撳墠灞曠ず鐨勭洃娴嬪洜瀛愬璞�
    * @param merge 鏄惁鍜屼箣鍓嶇粯鍒剁殑鍥惧舰鍚堝苟
-   * @param setCenter 闀滃ご鏄惁鑷姩绉诲姩鑷冲浘褰腑蹇�
    */
-  drawRoadMap(fDatas, factor, merge, setCenter) {
+  drawRoadMap(fDatas, factor, merge) {
     const lnglats_GD = fDatas.lnglats_GD;
     const heights = factor.heights;
 

--
Gitblit v1.9.3