- Build: Update per latest Rollup
- npm: Update devDeps
This commit is contained in:
43
dist/extensions/ext-shapes.js
vendored
43
dist/extensions/ext-shapes.js
vendored
@@ -38,7 +38,7 @@ var svgEditorExtension_shapes = (function () {
|
||||
}
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
@@ -46,10 +46,7 @@ var svgEditorExtension_shapes = (function () {
|
||||
}
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
@@ -75,8 +72,25 @@ var svgEditorExtension_shapes = (function () {
|
||||
return _arr;
|
||||
}
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) {
|
||||
if (!o) return;
|
||||
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(n);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
||||
}
|
||||
|
||||
function _arrayLikeToArray(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,15 +106,13 @@ var svgEditorExtension_shapes = (function () {
|
||||
init: function init(_ref) {
|
||||
var _this = this;
|
||||
|
||||
var $ = _ref.$,
|
||||
importLocale = _ref.importLocale;
|
||||
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
||||
var strings, svgEditor, canv, svgroot, lastBBox, categories, library, modeId, startClientPos, currentD, curShapeId, curShape, startX, startY, curLib, loadIcons, makeButtons, loadLibrary, buttons;
|
||||
var $, importLocale, strings, svgEditor, canv, svgroot, lastBBox, categories, library, modeId, startClientPos, currentD, curShapeId, curShape, startX, startY, curLib, loadIcons, makeButtons, loadLibrary, buttons;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
loadLibrary = function _ref8(catId) {
|
||||
loadLibrary = function _loadLibrary(catId) {
|
||||
var lib = library[catId];
|
||||
|
||||
if (!lib) {
|
||||
@@ -126,7 +138,7 @@ var svgEditorExtension_shapes = (function () {
|
||||
loadIcons();
|
||||
};
|
||||
|
||||
makeButtons = function _ref7(cat, shapes) {
|
||||
makeButtons = function _makeButtons(cat, shapes) {
|
||||
var size = curLib.size || 300;
|
||||
var fill = curLib.fill || false;
|
||||
var off = size * 0.05;
|
||||
@@ -155,14 +167,15 @@ var svgEditorExtension_shapes = (function () {
|
||||
});
|
||||
};
|
||||
|
||||
loadIcons = function _ref6() {
|
||||
loadIcons = function _loadIcons() {
|
||||
$('#shape_buttons').empty().append(curLib.buttons);
|
||||
};
|
||||
|
||||
_context.next = 5;
|
||||
$ = _ref.$, importLocale = _ref.importLocale;
|
||||
_context.next = 6;
|
||||
return importLocale();
|
||||
|
||||
case 5:
|
||||
case 6:
|
||||
strings = _context.sent;
|
||||
svgEditor = _this;
|
||||
canv = svgEditor.canvas;
|
||||
@@ -409,7 +422,7 @@ var svgEditorExtension_shapes = (function () {
|
||||
}
|
||||
});
|
||||
|
||||
case 17:
|
||||
case 18:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user