Commit de370b59 authored by Wenhao Liu's avatar Wenhao Liu Committed by 陈小聪

🐛 fix TagCloud style override bug (#3632)

parent 6088b879
...@@ -51,20 +51,16 @@ class TagCloud extends Component { ...@@ -51,20 +51,16 @@ class TagCloud extends Component {
initTagCloud = () => { initTagCloud = () => {
function getTextAttrs(cfg) { function getTextAttrs(cfg) {
return Object.assign( return Object.assign({}, cfg.style, {
{}, fillOpacity: cfg.opacity,
{ fontSize: cfg.origin._origin.size,
fillOpacity: cfg.opacity, rotate: cfg.origin._origin.rotate,
fontSize: cfg.origin._origin.size, text: cfg.origin._origin.text,
rotate: cfg.origin._origin.rotate, textAlign: 'center',
text: cfg.origin._origin.text, fontFamily: cfg.origin._origin.font,
textAlign: 'center', fill: cfg.color,
fontFamily: cfg.origin._origin.font, textBaseline: 'Alphabetic',
fill: cfg.color, });
textBaseline: 'Alphabetic',
},
cfg.style
);
} }
// 给point注册一个词云的shape // 给point注册一个词云的shape
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment