You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/14 10:48:07 UTC
[GitHub] [echarts] Ovilia commented on a change in pull request #16679: fix(visualmap): add textShadowColor, make text shadow work on visualMap. close #14440
Ovilia commented on a change in pull request #16679:
URL: https://github.com/apache/echarts/pull/16679#discussion_r825810536
##########
File path: src/component/visualMap/ContinuousView.ts
##########
@@ -182,17 +183,19 @@ class ContinuousView extends VisualMapView {
);
const orient = this._orient;
const textStyleModel = this.visualMapModel.textStyleModel;
+ const textShadow = textStyleModel.getTextShadow();
this.group.add(new graphic.Text({
- style: {
+ style: createTextStyle(textStyleModel, {
x: position[0],
y: position[1],
verticalAlign: orient === 'horizontal' ? 'middle' : align as TextVerticalAlign,
align: orient === 'horizontal' ? align as TextAlign : 'center',
- text: text,
+ text,
font: textStyleModel.getFont(),
- fill: textStyleModel.getTextColor()
- }
+ fill: textStyleModel.getTextColor(),
+ ...textShadow
Review comment:
`textShadow`, `font` and `fill` are not needed here because `createTextStyle` takes care of that.
##########
File path: src/model/mixin/textStyle.ts
##########
@@ -77,6 +79,15 @@ class TextStyleMixin {
tmpText.update();
return tmpText.getBoundingRect();
}
+
+ getTextShadow(this: Model<LabelTextShadowOption>) {
Review comment:
No longer needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org