Skip to content

Commit

Permalink
fix: fill about graph init
Browse files Browse the repository at this point in the history
  • Loading branch information
xachary committed Oct 31, 2024
1 parent 152135f commit 1172fd9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Render/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,17 +580,18 @@ export class Render {
getAssetSettings(asset?: Konva.Node): Types.AssetSettings {
const base = asset?.attrs.assetSettings ?? { ...Render.AssetSettingsDefault }

// 绘制图形,默认不填充
if (asset?.attrs.assetType === Types.AssetType.Graph) {
base.fill = 'transparent'
}
return {
// 特定
...base,
// 继承全局
stroke: base.stroke || this.getPageSettings().stroke,
strokeWidth: base.strokeWidth || this.getPageSettings().strokeWidth,
fill: base.fill || this.getPageSettings().fill
// 绘制图形,默认不填充
fill:
base.fill ||
(asset?.attrs.assetType === Types.AssetType.Graph
? 'transparent'
: this.getPageSettings().fill)
}
}

Expand Down

0 comments on commit 1172fd9

Please sign in to comment.