MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / createPathOptions

Function createPathOptions

libs/echarts/echarts.simple.js:15528–15552  ·  view source on GitHub ↗
(str, opts)

Source from the content-addressed store, hash-verified

15526
15527// TODO Optimize double memory cost problem
15528function createPathOptions(str, opts) {
15529 var pathProxy = createPathProxyFromString(str);
15530 opts = opts || {};
15531 opts.buildPath = function (path) {
15532 if (path.setData) {
15533 path.setData(pathProxy.data);
15534 // Svg and vml renderer don't have context
15535 var ctx = path.getContext();
15536 if (ctx) {
15537 path.rebuildPath(ctx);
15538 }
15539 }
15540 else {
15541 var ctx = path;
15542 pathProxy.rebuildPath(ctx);
15543 }
15544 };
15545
15546 opts.applyTransform = function (m) {
15547 transformPath(pathProxy, m);
15548 this.dirty(true);
15549 };
15550
15551 return opts;
15552}
15553
15554/**
15555 * Create a Path object from path string data

Callers 2

createFromStringFunction · 0.70
extendFromStringFunction · 0.70

Calls 4

transformPathFunction · 0.70
setDataMethod · 0.45
getContextMethod · 0.45

Tested by

no test coverage detected