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

Function createPathOptions

_benchmarks/sample_echarts.js:13058–13079  ·  view source on GitHub ↗
(str, opts)

Source from the content-addressed store, hash-verified

13056 return path.setData != null;
13057 }
13058 function createPathOptions(str, opts) {
13059 var pathProxy = createPathProxyFromString(str);
13060 var innerOpts = extend({}, opts);
13061 innerOpts.buildPath = function (path) {
13062 if (isPathProxy(path)) {
13063 path.setData(pathProxy.data);
13064 var ctx = path.getContext();
13065 if (ctx) {
13066 path.rebuildPath(ctx, 1);
13067 }
13068 }
13069 else {
13070 var ctx = path;
13071 pathProxy.rebuildPath(ctx, 1);
13072 }
13073 };
13074 innerOpts.applyTransform = function (m) {
13075 transformPath(pathProxy, m);
13076 this.dirtyShape();
13077 };
13078 return innerOpts;
13079 }
13080 function createFromString(str, opts) {
13081 return new SVGPath(createPathOptions(str, opts));
13082 }

Callers 2

createFromStringFunction · 0.85
extendFromStringFunction · 0.85

Calls 4

isPathProxyFunction · 0.85
transformPathFunction · 0.85
extendFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…