MCPcopy Index your code
hub / github.com/apache/echarts / createCompoundPath

Method createCompoundPath

src/component/helper/MapDraw.ts:354–376  ·  view source on GitHub ↗
(subpaths: graphic.Path[], isLine?: boolean)

Source from the content-addressed store, hash-verified

352 const centerPt = transformPoint(region.getCenter(), projection && projection.project);
353
354 function createCompoundPath(subpaths: graphic.Path[], isLine?: boolean) {
355 if (!subpaths.length) {
356 return;
357 }
358 const compoundPath = new graphic.CompoundPath({
359 culling: true,
360 segmentIgnoreThreshold: 1,
361 shape: {
362 paths: subpaths
363 }
364 });
365 regionGroup.add(compoundPath);
366
367 applyOptionStyleForRegion(api, data, isVisualEncodedByVisualMap, compoundPath, dataIdx, regionModel);
368 resetLabelForRegion(
369 mapOrGeoModel, data, compoundPath, regionName, regionModel, dataIdx, centerPt
370 );
371
372 if (isLine) {
373 fixLineStyle(compoundPath);
374 zrUtil.each(compoundPath.states, fixLineStyle);
375 }
376 }
377
378 createCompoundPath(polygonSubpaths);
379 createCompoundPath(polylineSubpaths, true);

Callers

nothing calls this directly

Calls 5

resetLabelForRegionFunction · 0.85
fixLineStyleFunction · 0.85
addMethod · 0.45
eachMethod · 0.45

Tested by

no test coverage detected