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/04/21 04:54:30 UTC

[GitHub] [echarts] pissang commented on a diff in pull request #16922: fix: legend visual still with decal when user set 'legend.itemStyle.decal' to 'none'

pissang commented on code in PR #16922:
URL: https://github.com/apache/echarts/pull/16922#discussion_r854772896


##########
src/model/mixin/itemStyle.ts:
##########
@@ -35,7 +35,8 @@ export const ITEM_STYLE_KEY_MAP = [
     ['lineDashOffset', 'borderDashOffset'],
     ['lineCap', 'borderCap'],
     ['lineJoin', 'borderJoin'],
-    ['miterLimit', 'borderMiterLimit']
+    ['miterLimit', 'borderMiterLimit'],
+    ['decal']

Review Comment:
   This underlying method maps the `itemStyle` in echarts to the style object in zrender.
   
   But `decal` in echarts is different with `decal` in zrender. In echarts it's an object that describe how the decal looks like. But in zrender it's a image that rendered as [pattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern) on top of the element.  So we didn't include `decal` here directly. Instead the decal property is created in https://github.com/apache/echarts/blob/4a52199842039d7fa6019ee8584d1a395fbc771a/src/visual/decal.ts#L44
   



-- 
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