Skip to content

Commit

Permalink
This code has been modified in 8c2267d (see #11854) and merge into ne…
Browse files Browse the repository at this point in the history
…xt branch in dd3d83c,

but in 58dc3f7 the merge was not correct enough (it cause the drillDownIcon displayed repeatedly in some case).
So fix it according to 8c2267d. And add the missing test case.
  • Loading branch information
100pah committed Feb 19, 2021
1 parent a44926a commit 2a49feb
Show file tree
Hide file tree
Showing 2 changed files with 418 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/chart/treemap/TreemapView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,24 +959,15 @@ function renderNode(
upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL
);

let text = retrieve(
seriesModel.getFormattedLabel(
thisNode.dataIndex, 'normal', null, null, normalLabelModel.get('formatter')
),
convertOptionIdName(nodeModel.get('name'), null)
);
if (!upperLabelRect && thisLayout.isLeafRoot) {
const iconChar = seriesModel.get('drillDownIcon', true);
text = iconChar ? iconChar + ' ' + text : text;
}
const defaultText = convertOptionIdName(nodeModel.get('name'), null);

const isShow = normalLabelModel.getShallow('show');

setLabelStyle(
rectEl,
getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL),
{
defaultText: isShow ? text : null,
defaultText: isShow ? defaultText : null,
inheritColor: visualColor,
defaultOpacity: visualOpacity,
labelFetcher: seriesModel,
Expand Down
Loading

0 comments on commit 2a49feb

Please sign in to comment.