Skip to content

Commit

Permalink
fix: 修复image节点fill属性覆盖父容器shape的问题 (#1923)
Browse files Browse the repository at this point in the history
Co-authored-by: chenkun <ck01107787@antgroup.com>
  • Loading branch information
ChenKun1997 and chenkun authored May 11, 2023
1 parent 6043024 commit b95ef44
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import G6, { IGroup, Node } from '@antv/g6';
import { clone, deepMix, each, isBoolean, isPlainObject, mix } from '@antv/util';
import { clone, deepMix, each, isBoolean, isPlainObject, mix, omit } from '@antv/util';
import { defaultCardStyle, defaultLabelStyle, defaultLineLabelStyle, defaultMargin, prefix } from '../../constants';
import { CardItems, CardNodeCfg, EdgeCfg, EdgeConfig, IPoint, IShape, CardItem } from '../../interface';
import {
Expand Down Expand Up @@ -288,7 +288,9 @@ export const registerIndicatorGeometries = () => {
text: item[key],
img: item[key],
...(isIcon ? defaultIconStyle : defaultLabelStyle),
...getStyle(itemStyle || labelStyle, cfg, group, key),
...(isIcon
? omit(getStyle(itemStyle || labelStyle, cfg, group, key), ['fill'])
: getStyle(itemStyle || labelStyle, cfg, group, key)),
},
name: `${key}-${index}-${keyIndex}`,
draggable,
Expand Down

0 comments on commit b95ef44

Please sign in to comment.