From c7a16ca1b6fbcb0b82a4a09c2e75014624082e37 Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期四, 27 三月 2025 22:45:48 +0800
Subject: [PATCH] 修复走航融合功能bug
---
src/utils/map/grid.js | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/utils/map/grid.js b/src/utils/map/grid.js
index 18241d1..235b390 100644
--- a/src/utils/map/grid.js
+++ b/src/utils/map/grid.js
@@ -264,7 +264,8 @@
strokeWeight: 1, //绾挎潯瀹藉害锛岄粯璁や负 2
strokeColor: 'white', //绾挎潯棰滆壊
fillOpacity: 0,
- extData: p.extData
+ extData: p.extData,
+ zIndex: 11
});
if (typeof event === 'function') {
@@ -349,7 +350,12 @@
* @param {number} opacity 閫忔槑搴�
*/
drawGridColor(gridViews, gridDataDetail, factorName, style) {
- let { strokeWeight, strokeColor, opacity, zIndex } = style;
+ let {
+ strokeWeight = 1,
+ strokeColor = 'white',
+ opacity = 1,
+ zIndex = 11
+ } = style;
const res = [];
// 閬嶅巻鍗槦閬ユ祴鏁版嵁鏁扮粍
gridDataDetail.forEach((d, i) => {
@@ -369,9 +375,11 @@
const _extData = grid.getExtData();
grid.setOptions({
- ...style,
+ strokeWeight,
+ strokeColor,
+ zIndex,
fillColor: _color, //澶氳竟褰㈠~鍏呴鑹�
- fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1,
+ fillOpacity: opacity,
extData: {
..._extData,
gridData: d
@@ -393,8 +401,7 @@
return res;
},
- drawGridColorCustom(gridViews, gridDataDetail, style) {
- const { strokeWeight, strokeColor, opacity, zIndex } = style;
+ drawGridColorCustom(gridViews, gridDataDetail) {
var max, min;
gridDataDetail.forEach((t) => {
@@ -424,9 +431,8 @@
ratio
);
grid.setOptions({
- ...style,
fillColor: _color, //澶氳竟褰㈠~鍏呴鑹�
- fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1
+ // fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1
});
res.push(grid);
--
Gitblit v1.9.3