Skip to content

Commit

Permalink
填充颜色优化
Browse files Browse the repository at this point in the history
  • Loading branch information
hy16657 committed Sep 8, 2024
1 parent 6bd0f76 commit 715e143
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ export function getShapeFill(node, isSvgMode, warpObj) {
}

export function getSolidFill(solidFill, clrMap, phClr, warpObj) {
if (!solidFill) return solidFill
if (!solidFill) return ''

let color = '#ffffff'
let color = ''
let clrNode

if (solidFill['a:srgbClr']) {
Expand All @@ -464,7 +464,7 @@ export function getSolidFill(solidFill, clrMap, phClr, warpObj) {
else if (solidFill['a:schemeClr']) {
clrNode = solidFill['a:schemeClr']
const schemeClr = 'a:' + getTextByPathList(clrNode, ['attrs', 'val'])
color = getSchemeColorFromTheme(schemeClr, warpObj, clrMap, phClr) || '#ffffff'
color = getSchemeColorFromTheme(schemeClr, warpObj, clrMap, phClr) || ''
}
else if (solidFill['a:scrgbClr']) {
clrNode = solidFill['a:scrgbClr']
Expand Down

0 comments on commit 715e143

Please sign in to comment.