MCPcopy
hub / github.com/tdewolff/minify / GeoSVGResource

Function GeoSVGResource

_benchmarks/sample_echarts.js:28478–28492  ·  view source on GitHub ↗
(mapName, svg)

Source from the content-addressed store, hash-verified

28476 /** @class */
28477 function () {
28478 function GeoSVGResource(mapName, svg) {
28479 this.type = 'geoSVG'; // All used graphics. key: hostKey, value: root
28480
28481 this._usedGraphicMap = createHashMap(); // All unused graphics.
28482
28483 this._freedGraphics = [];
28484 this._mapName = mapName; // Only perform parse to XML object here, which might be time
28485 // consiming for large SVG.
28486 // Although convert XML to zrender element is also time consiming,
28487 // if we do it here, the clone of zrender elements has to be
28488 // required. So we do it once for each geo instance, util real
28489 // performance issues call for optimizing it.
28490
28491 this._parsedXML = parseXML(svg);
28492 }
28493
28494 GeoSVGResource.prototype.load = function ()
28495 /* nameMap: NameMap */

Callers

nothing calls this directly

Calls 2

createHashMapFunction · 0.85
parseXMLFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…