update:优化精准训练描边
This commit is contained in:
@@ -164,6 +164,8 @@ const defaultHighlightStyle = {
|
|||||||
color: "rgba(255, 228, 0, 0.6)",
|
color: "rgba(255, 228, 0, 0.6)",
|
||||||
strokeColor: "rgba(254, 216, 71, 0.82)",
|
strokeColor: "rgba(254, 216, 71, 0.82)",
|
||||||
lineWidthRatio: 0.003,
|
lineWidthRatio: 0.003,
|
||||||
|
// 在最小线宽计算后应用倍数,确保不同靶面尺寸下按比例加粗。
|
||||||
|
lineWidthScale: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。
|
// 合并默认靶纸样式和外部传入样式,ringColors 单独深合并。
|
||||||
@@ -319,7 +321,7 @@ const drawSectorHighlight = (
|
|||||||
(angles.endAngle - angles.startAngle) * safeRevealProgress,
|
(angles.endAngle - angles.startAngle) * safeRevealProgress,
|
||||||
style.color,
|
style.color,
|
||||||
style.strokeColor,
|
style.strokeColor,
|
||||||
Math.max(1, targetRadius * style.lineWidthRatio)
|
Math.max(1, targetRadius * style.lineWidthRatio) * style.lineWidthScale
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -546,6 +546,7 @@ onBeforeUnmount(() => {
|
|||||||
:showCrosshair="false"
|
:showCrosshair="false"
|
||||||
:showRingLabels="false"
|
:showRingLabels="false"
|
||||||
:highlightOnly="true"
|
:highlightOnly="true"
|
||||||
|
:highlightStyle="{ strokeColor: '#00fffc', lineWidthScale: 3 }"
|
||||||
:sectorCount="sectorCount"
|
:sectorCount="sectorCount"
|
||||||
:activeSector="activeSector"
|
:activeSector="activeSector"
|
||||||
:activeRings="activeRings"
|
:activeRings="activeRings"
|
||||||
|
|||||||
Reference in New Issue
Block a user