update at 2026-01-22 20:58:03
This commit is contained in:
@@ -55,7 +55,10 @@ export class SectorBuilder {
|
|||||||
|
|
||||||
// 颜色优先级:sector > layer pattern > background
|
// 颜色优先级:sector > layer pattern > background
|
||||||
const fillColor = this.colorResolver.resolveSectorColor(layerColorMap, sectorConfig, i);
|
const fillColor = this.colorResolver.resolveSectorColor(layerColorMap, sectorConfig, i);
|
||||||
const textColor = getTextColorForBackground(fillColor);
|
const layerColor = layer.colorRef ? this.colorResolver.resolveColor(layer.colorRef) : undefined;
|
||||||
|
const sectorColor = sectorConfig?.colorRef
|
||||||
|
? this.colorResolver.resolveColor(sectorConfig.colorRef)
|
||||||
|
: undefined;
|
||||||
const innerFill = (sectorConfig?.innerFill ?? layer.innerFill ?? 0) === 1;
|
const innerFill = (sectorConfig?.innerFill ?? layer.innerFill ?? 0) === 1;
|
||||||
const innerFillPath = innerFill
|
const innerFillPath = innerFill
|
||||||
? annularSectorInsetPath(
|
? annularSectorInsetPath(
|
||||||
@@ -70,6 +73,9 @@ export class SectorBuilder {
|
|||||||
innerFillPath && innerFillPath.length > 0 ? innerFillPath : undefined;
|
innerFillPath && innerFillPath.length > 0 ? innerFillPath : undefined;
|
||||||
const hasInnerFillPath = Boolean(normalizedInnerFillPath);
|
const hasInnerFillPath = Boolean(normalizedInnerFillPath);
|
||||||
const baseFillColor = hasInnerFillPath ? '#ffffff' : fillColor;
|
const baseFillColor = hasInnerFillPath ? '#ffffff' : fillColor;
|
||||||
|
const innerFillColor = hasInnerFillPath ? sectorColor ?? layerColor ?? fillColor : undefined;
|
||||||
|
const textBaseColor = hasInnerFillPath ? innerFillColor ?? fillColor : fillColor;
|
||||||
|
const textColor = getTextColorForBackground(textBaseColor);
|
||||||
|
|
||||||
const sectorKey = `L${layerIndex}-P${i}`;
|
const sectorKey = `L${layerIndex}-P${i}`;
|
||||||
const textPathId = `text-path-${sectorKey}`;
|
const textPathId = `text-path-${sectorKey}`;
|
||||||
@@ -123,7 +129,7 @@ export class SectorBuilder {
|
|||||||
label: isMultiText ? '' : rawContent,
|
label: isMultiText ? '' : rawContent,
|
||||||
path: annularSectorPath(layer.rInner, layer.rOuter, aStart, aEnd),
|
path: annularSectorPath(layer.rInner, layer.rOuter, aStart, aEnd),
|
||||||
innerFillPath: normalizedInnerFillPath,
|
innerFillPath: normalizedInnerFillPath,
|
||||||
innerFillColor: hasInnerFillPath ? fillColor : undefined,
|
innerFillColor,
|
||||||
textPath,
|
textPath,
|
||||||
textPathId,
|
textPathId,
|
||||||
isVertical,
|
isVertical,
|
||||||
|
|||||||
Reference in New Issue
Block a user