From de370b5995ea3441830b7065cae817f7b391e205 Mon Sep 17 00:00:00 2001 From: Wenhao Liu Date: Thu, 28 Feb 2019 16:28:01 +0800 Subject: [PATCH] :bug: fix TagCloud style override bug (#3632) --- src/components/Charts/TagCloud/index.js | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/components/Charts/TagCloud/index.js b/src/components/Charts/TagCloud/index.js index d94699bd..4898d821 100644 --- a/src/components/Charts/TagCloud/index.js +++ b/src/components/Charts/TagCloud/index.js @@ -51,20 +51,16 @@ class TagCloud extends Component { initTagCloud = () => { function getTextAttrs(cfg) { - return Object.assign( - {}, - { - fillOpacity: cfg.opacity, - fontSize: cfg.origin._origin.size, - rotate: cfg.origin._origin.rotate, - text: cfg.origin._origin.text, - textAlign: 'center', - fontFamily: cfg.origin._origin.font, - fill: cfg.color, - textBaseline: 'Alphabetic', - }, - cfg.style - ); + return Object.assign({}, cfg.style, { + fillOpacity: cfg.opacity, + fontSize: cfg.origin._origin.size, + rotate: cfg.origin._origin.rotate, + text: cfg.origin._origin.text, + textAlign: 'center', + fontFamily: cfg.origin._origin.font, + fill: cfg.color, + textBaseline: 'Alphabetic', + }); } // 给point注册一个词云的shape -- GitLab