(str, opts)
| 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 | } |
no test coverage detected
searching dependent graphs…