- npm: Update devDeps
- Build: Update dist files
This commit is contained in:
92
dist/canvg.js
vendored
92
dist/canvg.js
vendored
@@ -15,6 +15,42 @@ var canvg = (function (exports) {
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function () {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
||||
}
|
||||
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
||||
}
|
||||
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
@@ -4536,26 +4572,36 @@ var canvg = (function (exports) {
|
||||
}; // load from url
|
||||
|
||||
|
||||
svg.load = function _callee(ctx, url) {
|
||||
var dom;
|
||||
return regeneratorRuntime.async(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return regeneratorRuntime.awrap(svg.ajax(url, true));
|
||||
svg.load =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var _ref12 = _asyncToGenerator(
|
||||
/*#__PURE__*/
|
||||
regeneratorRuntime.mark(function _callee(ctx, url) {
|
||||
var dom;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return svg.ajax(url, true);
|
||||
|
||||
case 2:
|
||||
dom = _context.sent;
|
||||
return _context.abrupt("return", svg.loadXml(ctx, dom));
|
||||
case 2:
|
||||
dom = _context.sent;
|
||||
return _context.abrupt("return", svg.loadXml(ctx, dom));
|
||||
|
||||
case 4:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
case 4:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}; // load from xml
|
||||
}, _callee);
|
||||
}));
|
||||
|
||||
return function (_x2, _x3) {
|
||||
return _ref12.apply(this, arguments);
|
||||
};
|
||||
}(); // load from xml
|
||||
|
||||
|
||||
svg.loadXml = function (ctx, xml) {
|
||||
@@ -4776,9 +4822,9 @@ var canvg = (function (exports) {
|
||||
checkPath: function checkPath(element, ctx) {
|
||||
var _this26 = this;
|
||||
|
||||
this.events.forEach(function (_ref12, i) {
|
||||
var x = _ref12.x,
|
||||
y = _ref12.y;
|
||||
this.events.forEach(function (_ref13, i) {
|
||||
var x = _ref13.x,
|
||||
y = _ref13.y;
|
||||
|
||||
if (ctx.isPointInPath && ctx.isPointInPath(x, y)) {
|
||||
_this26.eventElements[i] = element;
|
||||
@@ -4788,9 +4834,9 @@ var canvg = (function (exports) {
|
||||
checkBoundingBox: function checkBoundingBox(element, bb) {
|
||||
var _this27 = this;
|
||||
|
||||
this.events.forEach(function (_ref13, i) {
|
||||
var x = _ref13.x,
|
||||
y = _ref13.y;
|
||||
this.events.forEach(function (_ref14, i) {
|
||||
var x = _ref14.x,
|
||||
y = _ref14.y;
|
||||
|
||||
if (bb.isPointInBox(x, y)) {
|
||||
_this27.eventElements[i] = element;
|
||||
|
||||
Reference in New Issue
Block a user