提交 b38c3876 编写于 作者: P pissang

fix(decal): fix decal not work on map

上级 f6bcae8e
......@@ -38,6 +38,7 @@ import Model from '../../model/Model';
import Transformable from 'zrender/src/core/Transformable';
import { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle';
import { getECData } from '../../util/innerStore';
import { createOrUpdatePatternFromDecal } from '../../util/decal';
interface RegionsGroup extends graphic.Group {
......@@ -206,9 +207,13 @@ class MapDraw {
//
// Visual color for each series is for the symbol draw
const style = data.getItemVisual(dataIdx, 'style');
const decal = data.getItemVisual(dataIdx, 'decal');
if (isVisualEncodedByVisualMap && style.fill) {
itemStyle.fill = style.fill;
}
if (decal) {
itemStyle.decal = createOrUpdatePatternFromDecal(decal, api);
}
}
const sx = transformInfo.rawScaleX;
......
......@@ -8,7 +8,6 @@ import {createSymbol} from './symbol';
import {util} from 'zrender/src/export';
import ExtensionAPI from '../ExtensionAPI';
import type SVGPainter from 'zrender/src/svg/Painter';
import type CanvasPainter from 'zrender/src/canvas/Painter';
import { brushSingle } from 'zrender/src/canvas/graphic';
const decalMap = new WeakMap<DecalObject, PatternObject>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册