(subpaths: graphic.Path[], isLine?: boolean)
| 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); |
nothing calls this directly
no test coverage detected