diff --git a/dist/canvg.js b/dist/canvg.js index 82fe0517..bc98c66f 100644 --- a/dist/canvg.js +++ b/dist/canvg.js @@ -2,6 +2,8 @@ var canvg = (function (exports) { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; diff --git a/dist/dom-polyfill.js b/dist/dom-polyfill.js index 93d6e400..dc627299 100644 --- a/dist/dom-polyfill.js +++ b/dist/dom-polyfill.js @@ -2,6 +2,8 @@ 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; diff --git a/dist/extensions/ext-arrows.js b/dist/extensions/ext-arrows.js index 70193c19..f2705a42 100644 --- a/dist/extensions/ext-arrows.js +++ b/dist/extensions/ext-arrows.js @@ -47,10 +47,12 @@ var svgEditorExtension_arrows = (function () { */ var extArrows = { name: 'arrows', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(S) { + regeneratorRuntime.mark(function _callee2() { var strings, svgEditor, svgCanvas, addElem, nonce, $, prefix, selElems, arrowprefix, randomizeIds, setArrowNonce, unsetArrowNonce, pathdata, getLinked, showPanel, resetMarker, addMarker, setArrow, colorChanged, contextTools; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -266,7 +268,7 @@ var svgEditorExtension_arrows = (function () { case 10: strings = _context2.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; // {svgcontent} = S, addElem = svgCanvas.addSVGElementFromJson, nonce = S.nonce, $ = S.$, prefix = 'se_arrow_'; @@ -324,41 +326,36 @@ var svgEditorExtension_arrows = (function () { $('#arrow_list option')[0].id = 'connector_no_arrow'; }, - addLangData: function () { - var _addLangData = _asyncToGenerator( + addLangData: function addLangData(_ref) { + var lang = _ref.lang, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var lang, importLocale, _ref2, langList; + regeneratorRuntime.mark(function _callee() { + var _ref2, langList; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - lang = _ref.lang, importLocale = _ref.importLocale; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: _ref2 = _context.sent; langList = _ref2.langList; return _context.abrupt("return", { data: langList }); - case 6: + case 5: case "end": return _context.stop(); } } }, _callee); - })); - - function addLangData(_x2) { - return _addLangData.apply(this, arguments); - } - - return addLangData; - }(), + }))(); + }, selectedChanged: function selectedChanged(opts) { // Use this to update the current selected elements selElems = opts.elems; @@ -397,15 +394,9 @@ var svgEditorExtension_arrows = (function () { return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extArrows; diff --git a/dist/extensions/ext-closepath.js b/dist/extensions/ext-closepath.js index 12d1cf25..1c7dc48b 100644 --- a/dist/extensions/ext-closepath.js +++ b/dist/extensions/ext-closepath.js @@ -49,22 +49,25 @@ var svgEditorExtension_closepath = (function () { // The button toggles whether the path is open or closed var extClosepath = { name: 'closepath', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var importLocale = _ref.importLocale, + $ = _ref.$; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var importLocale, $, strings, svgEditor, selElems, updateButton, showPanel, toggleClosed, buttons; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, selElems, updateButton, showPanel, toggleClosed, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - importLocale = _ref.importLocale, $ = _ref.$; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: strings = _context.sent; - svgEditor = this; + svgEditor = _this; updateButton = function updateButton(path) { var seglist = path.pathSegList, @@ -154,20 +157,14 @@ var svgEditorExtension_closepath = (function () { } }); - case 10: + case 9: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extClosepath; diff --git a/dist/extensions/ext-connector.js b/dist/extensions/ext-connector.js index 6991dcb3..b78fb4be 100644 --- a/dist/extensions/ext-connector.js +++ b/dist/extensions/ext-connector.js @@ -49,10 +49,12 @@ var svgEditorExtension_connector = (function () { */ var extConnector = { name: 'connector', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var svgEditor, svgCanvas, getElem, $, svgroot, importLocale, addElem, selManager, connSel, elData, strings, startX, startY, curLine, startElem, endElem, seNs, svgcontent, started, connections, selElems, getBBintersect, getOffset, showPanel, setPoint, updateLine, findConnectors, updateConnectors, init, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -298,7 +300,7 @@ var svgEditorExtension_connector = (function () { }; }; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; getElem = svgCanvas.getElem; $ = S.$, svgroot = S.svgroot, importLocale = S.importLocale, addElem = svgCanvas.addSVGElementFromJson, selManager = S.selectorManager, connSel = '.se_connector', elData = $.data; @@ -683,15 +685,9 @@ var svgEditorExtension_connector = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extConnector; diff --git a/dist/extensions/ext-eyedropper.js b/dist/extensions/ext-eyedropper.js index b7ff5919..292313f8 100644 --- a/dist/extensions/ext-eyedropper.js +++ b/dist/extensions/ext-eyedropper.js @@ -47,10 +47,12 @@ var svgEditorExtension_eyedropper = (function () { */ var extEyedropper = { name: 'eyedropper', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var strings, svgEditor, $, ChangeElementCommand, svgCanvas, addToHistory, currentStyle, getStyle, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -91,7 +93,7 @@ var svgEditorExtension_eyedropper = (function () { case 3: strings = _context.sent; - svgEditor = this; + svgEditor = _this; $ = S.$, ChangeElementCommand = S.ChangeElementCommand, svgCanvas = svgEditor.canvas, addToHistory = function addToHistory(cmd) { svgCanvas.undoMgr.addCommandToHistory(cmd); }, currentStyle = { @@ -192,15 +194,9 @@ var svgEditorExtension_eyedropper = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extEyedropper; diff --git a/dist/extensions/ext-foreignobject.js b/dist/extensions/ext-foreignobject.js index 87ac57c9..930eab1b 100644 --- a/dist/extensions/ext-foreignobject.js +++ b/dist/extensions/ext-foreignobject.js @@ -47,10 +47,12 @@ var svgEditorExtension_foreignobject = (function () { */ var extForeignobject = { name: 'foreignobject', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(S) { + regeneratorRuntime.mark(function _callee2() { var svgEditor, $, text2xml, NS, importLocale, svgCanvas, svgdoc, strings, properlySourceSizeTextArea, showPanel, toggleSourceButtons, selElems, started, newFO, editingforeign, setForeignString, showForeignEditor, setAttr, buttons, contextTools; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -115,7 +117,7 @@ var svgEditorExtension_foreignobject = (function () { $('#foreignObject_panel').toggle(on); }; - svgEditor = this; + svgEditor = _this; $ = S.$, text2xml = S.text2xml, NS = S.NS, importLocale = S.importLocale; svgCanvas = svgEditor.canvas; svgdoc = S.svgroot.parentNode.ownerDocument; @@ -357,15 +359,9 @@ var svgEditorExtension_foreignobject = (function () { return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extForeignobject; diff --git a/dist/extensions/ext-grid.js b/dist/extensions/ext-grid.js index ea8987c2..c9744b38 100644 --- a/dist/extensions/ext-grid.js +++ b/dist/extensions/ext-grid.js @@ -47,11 +47,17 @@ var svgEditorExtension_grid = (function () { */ var extGrid = { name: 'grid', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + NS = _ref.NS, + getTypeMap = _ref.getTypeMap, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var $, NS, getTypeMap, importLocale, strings, svgEditor, svgCanvas, svgdoc, assignAttributes, hcanvas, canvBG, units, intervals, showGrid, canvasGrid, gridDefs, gridPattern, gridimg, gridBox, updateGrid, gridUpdate, buttons; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, svgCanvas, svgdoc, assignAttributes, hcanvas, canvBG, units, intervals, showGrid, canvasGrid, gridDefs, gridPattern, gridimg, gridBox, updateGrid, gridUpdate, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { @@ -113,13 +119,12 @@ var svgEditorExtension_grid = (function () { svgCanvas.setHref(gridimg, datauri); }; - $ = _ref.$, NS = _ref.NS, getTypeMap = _ref.getTypeMap, importLocale = _ref.importLocale; - _context.next = 5; + _context.next = 4; return importLocale(); - case 5: + case 4: strings = _context.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; svgdoc = document.getElementById('svgcanvas').ownerDocument, assignAttributes = svgCanvas.assignAttributes, hcanvas = document.createElement('canvas'), canvBG = $('#canvasBackground'), units = getTypeMap(), intervals = [0.01, 0.1, 1, 10, 100, 1000]; showGrid = svgEditor.curConfig.showGrid || false; @@ -207,20 +212,14 @@ var svgEditorExtension_grid = (function () { }) }); - case 27: + case 26: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extGrid; diff --git a/dist/extensions/ext-helloworld.js b/dist/extensions/ext-helloworld.js index d16c9607..6b490d2b 100644 --- a/dist/extensions/ext-helloworld.js +++ b/dist/extensions/ext-helloworld.js @@ -95,22 +95,25 @@ var svgEditorExtension_helloworld = (function () { */ var extHelloworld = { name: 'helloworld', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var $, importLocale, strings, svgEditor, svgCanvas; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, svgCanvas; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - $ = _ref.$, importLocale = _ref.importLocale; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: strings = _context.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; return _context.abrupt("return", { name: strings.name, @@ -176,20 +179,14 @@ var svgEditorExtension_helloworld = (function () { } }); - case 7: + case 6: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extHelloworld; diff --git a/dist/extensions/ext-imagelib.js b/dist/extensions/ext-imagelib.js index e7eb4f12..0458b88f 100644 --- a/dist/extensions/ext-imagelib.js +++ b/dist/extensions/ext-imagelib.js @@ -2,6 +2,8 @@ var svgEditorExtension_imagelib = (function () { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; @@ -61,11 +63,17 @@ var svgEditorExtension_imagelib = (function () { */ var extImagelib = { name: 'imagelib', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + decode64 = _ref.decode64, + importLocale = _ref.importLocale, + dropXMLInternalSubset = _ref.dropXMLInternalSubset; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(_ref) { - var $, decode64, importLocale, dropXMLInternalSubset, imagelibStrings, modularVersion, svgEditor, uiStrings, svgCanvas, extIconsPath, allowedImageLibOrigins, closeBrowser, importImage, pending, mode, multiArr, transferStopped, preview, submit, onMessage, _onMessage, toggleMulti, showBrowser, buttons; + regeneratorRuntime.mark(function _callee2() { + var imagelibStrings, modularVersion, svgEditor, uiStrings, svgCanvas, extIconsPath, allowedImageLibOrigins, closeBrowser, importImage, pending, mode, multiArr, transferStopped, preview, submit, onMessage, _onMessage, toggleMulti, showBrowser, buttons; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { @@ -127,10 +135,10 @@ var svgEditorExtension_imagelib = (function () { }); cancel.prepend($.getSvgIcon('cancel', true)); back.prepend($.getSvgIcon('tool_imagelib', true)); - imagelibStrings.imgLibs.forEach(function (_ref5) { - var name = _ref5.name, - url = _ref5.url, - description = _ref5.description; + imagelibStrings.imgLibs.forEach(function (_ref4) { + var name = _ref4.name, + url = _ref4.url, + description = _ref4.description; $('
  • ').appendTo(libOpts).text(name).on('click touchend', function () { frame.attr('src', url).show(); header.text(name); @@ -188,13 +196,13 @@ var svgEditorExtension_imagelib = (function () { _onMessage = function _ref9() { _onMessage = _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref4) { + regeneratorRuntime.mark(function _callee(_ref5) { var origin, response, id, type, hasName, hasHref, char1, secondpos, entry, curMeta, svgStr, imgStr, name, message, pre, src, title, xml, ok; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - origin = _ref4.origin, response = _ref4.data; + origin = _ref5.origin, response = _ref5.data; if (!(!response || !['string', 'object'].includes(_typeof(response)))) { _context.next = 3; @@ -473,7 +481,7 @@ var svgEditorExtension_imagelib = (function () { return _onMessage.apply(this, arguments); }; - onMessage = function _ref8(_x2) { + onMessage = function _ref8(_x) { return _onMessage.apply(this, arguments); }; @@ -498,14 +506,13 @@ var svgEditorExtension_imagelib = (function () { $('#imgbrowse_holder').hide(); }; - $ = _ref.$, decode64 = _ref.decode64, importLocale = _ref.importLocale, dropXMLInternalSubset = _ref.dropXMLInternalSubset; - _context2.next = 9; + _context2.next = 8; return importLocale(); - case 9: + case 8: imagelibStrings = _context2.sent; modularVersion = !('svgEditor' in window) || !window.svgEditor || window.svgEditor.modules !== false; - svgEditor = this; + svgEditor = _this; uiStrings = svgEditor.uiStrings, svgCanvas = svgEditor.canvas, extIconsPath = svgEditor.curConfig.extIconsPath; imagelibStrings.imgLibs = imagelibStrings.imgLibs.map(function (_ref2) { var name = _ref2.name, @@ -564,20 +571,14 @@ var svgEditorExtension_imagelib = (function () { } }); - case 22: + case 21: case "end": return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extImagelib; diff --git a/dist/extensions/ext-markers.js b/dist/extensions/ext-markers.js index 707b2aa9..641c1746 100644 --- a/dist/extensions/ext-markers.js +++ b/dist/extensions/ext-markers.js @@ -69,10 +69,12 @@ var svgEditorExtension_markers = (function () { */ var extMarkers = { name: 'markers', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee3(S) { + regeneratorRuntime.mark(function _callee3() { var strings, svgEditor, $, svgCanvas, addElem, mtypes, markerPrefix, idPrefix, markerTypes, getLinked, setIcon, selElems, showPanel, addMarker, convertline, setMarker, colorChanged, updateReferences, triggerTextEntry, showTextPrompt, _showTextPrompt, setArrowFromButton, _setArrowFromButton, getTitle, buildButtonList, contextTools; return regeneratorRuntime.wrap(function _callee3$(_context3) { @@ -178,7 +180,7 @@ var svgEditorExtension_markers = (function () { return _setArrowFromButton.apply(this, arguments); }; - setArrowFromButton = function _ref13(_x3) { + setArrowFromButton = function _ref13(_x2) { return _setArrowFromButton.apply(this, arguments); }; @@ -217,7 +219,7 @@ var svgEditorExtension_markers = (function () { return _showTextPrompt.apply(this, arguments); }; - showTextPrompt = function _ref11(_x2) { + showTextPrompt = function _ref11(_x) { return _showTextPrompt.apply(this, arguments); }; @@ -550,7 +552,7 @@ var svgEditorExtension_markers = (function () { case 17: strings = _context3.sent; - svgEditor = this; + svgEditor = _this; $ = S.$; svgCanvas = svgEditor.canvas; addElem = svgCanvas.addSVGElementFromJson; @@ -757,15 +759,9 @@ var svgEditorExtension_markers = (function () { return _context3.stop(); } } - }, _callee3, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee3); + }))(); + } }; return extMarkers; diff --git a/dist/extensions/ext-mathjax.js b/dist/extensions/ext-mathjax.js index 72926763..b48b2ecd 100644 --- a/dist/extensions/ext-mathjax.js +++ b/dist/extensions/ext-mathjax.js @@ -103,11 +103,15 @@ var svgEditorExtension_mathjax = (function () { var extMathjax = { name: 'mathjax', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(_ref) { - var $, importLocale, strings, svgEditor, svgCanvas, mathjaxSrcSecure, uiStrings, math, locationX, locationY, mathjaxLoaded, saveMath, buttons; + regeneratorRuntime.mark(function _callee2() { + var strings, svgEditor, svgCanvas, mathjaxSrcSecure, uiStrings, math, locationX, locationY, mathjaxLoaded, saveMath, buttons; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { @@ -164,13 +168,12 @@ var svgEditorExtension_mathjax = (function () { }); }; - $ = _ref.$, importLocale = _ref.importLocale; - _context2.next = 4; + _context2.next = 3; return importLocale(); - case 4: + case 3: strings = _context2.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; // Configuration of the MathJax extention. // This will be added to the head tag before MathJax is loaded. @@ -222,8 +225,8 @@ var svgEditorExtension_mathjax = (function () { type: 'mode', icon: svgEditor.curConfig.extIconsPath + 'mathjax.png', events: { - click: function () { - var _click = _asyncToGenerator( + click: function click() { + return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee() { return regeneratorRuntime.wrap(function _callee$(_context) { @@ -307,14 +310,8 @@ var svgEditorExtension_mathjax = (function () { } } }, _callee, null, [[7, 13]]); - })); - - function click() { - return _click.apply(this, arguments); - } - - return click; - }() + }))(); + } } }]; return _context2.abrupt("return", { @@ -353,20 +350,14 @@ var svgEditorExtension_mathjax = (function () { } }); - case 12: + case 11: case "end": return _context2.stop(); } } - }, _callee2, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee2); + }))(); + } }; return extMathjax; diff --git a/dist/extensions/ext-panning.js b/dist/extensions/ext-panning.js index b4026216..5d807797 100644 --- a/dist/extensions/ext-panning.js +++ b/dist/extensions/ext-panning.js @@ -51,22 +51,24 @@ var svgEditorExtension_panning = (function () { */ var extPanning = { name: 'panning', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(_ref) { - var importLocale, strings, svgEditor, svgCanvas, buttons; + regeneratorRuntime.mark(function _callee() { + var strings, svgEditor, svgCanvas, buttons; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - importLocale = _ref.importLocale; - _context.next = 3; + _context.next = 2; return importLocale(); - case 3: + case 2: strings = _context.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; buttons = [{ id: 'ext-panning', @@ -107,20 +109,14 @@ var svgEditorExtension_panning = (function () { } }); - case 8: + case 7: case "end": return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extPanning; diff --git a/dist/extensions/ext-placemark.js b/dist/extensions/ext-placemark.js index 52cf38ee..2d0701e4 100644 --- a/dist/extensions/ext-placemark.js +++ b/dist/extensions/ext-placemark.js @@ -88,10 +88,12 @@ var svgEditorExtension_placemark = (function () { */ var extPlacemark = { name: 'placemark', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var svgEditor, svgCanvas, addElem, $, importLocale, selElems, started, newPM, strings, markerTypes, showPanel, getLinked, updateText, updateFont, addMarker, setMarker, colorChanged, updateReferences, setArrowFromButton, getTitle, addMarkerButtons, buttons, contextTools; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -340,7 +342,7 @@ var svgEditorExtension_placemark = (function () { $('#placemark_panel').toggle(on); }; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; addElem = svgCanvas.addSVGElementFromJson; $ = S.$, importLocale = S.importLocale; // {svgcontent}, @@ -700,15 +702,9 @@ var svgEditorExtension_placemark = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extPlacemark; diff --git a/dist/extensions/ext-polygon.js b/dist/extensions/ext-polygon.js index d028dd6d..14c436d5 100644 --- a/dist/extensions/ext-polygon.js +++ b/dist/extensions/ext-polygon.js @@ -46,10 +46,12 @@ var svgEditorExtension_polygon = (function () { */ var extPolygon = { name: 'polygon', - init: function () { - var _init = _asyncToGenerator( + init: function init(S) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(S) { + regeneratorRuntime.mark(function _callee() { var svgEditor, svgCanvas, $, importLocale, editingitex, strings, selElems, started, newFO, showPanel, setAttr, cot, sec, buttons, contextTools; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { @@ -79,7 +81,7 @@ var svgEditorExtension_polygon = (function () { $('#polygon_panel').toggle(on); }; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; $ = S.$, importLocale = S.importLocale, editingitex = false; _context.next = 9; @@ -299,15 +301,9 @@ var svgEditorExtension_polygon = (function () { return _context.stop(); } } - }, _callee, this); - })); - - function init(_x) { - return _init.apply(this, arguments); - } - - return init; - }() + }, _callee); + }))(); + } }; return extPolygon; diff --git a/dist/extensions/ext-server_moinsave.js b/dist/extensions/ext-server_moinsave.js index 1173fbcc..bf86a25e 100644 --- a/dist/extensions/ext-server_moinsave.js +++ b/dist/extensions/ext-server_moinsave.js @@ -2,6 +2,8 @@ var svgEditorExtension_server_moinsave = (function () { 'use strict'; function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; @@ -4880,22 +4882,26 @@ var svgEditorExtension_server_moinsave = (function () { var extServer_moinsave = { name: 'server_moinsave', - init: function () { - var _init = _asyncToGenerator( + init: function init(_ref) { + var _this = this; + + var $ = _ref.$, + encode64 = _ref.encode64, + importLocale = _ref.importLocale; + return _asyncToGenerator( /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(_ref) { - var $, encode64, importLocale, strings, svgEditor, svgCanvas, saveSvgAction; + regeneratorRuntime.mark(function _callee2() { + var strings, svgEditor, svgCanvas, saveSvgAction; return regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: - $ = _ref.$, encode64 = _ref.encode64, importLocale = _ref.importLocale; - _context2.next = 3; + _context2.next = 2; return importLocale(); - case 3: + case 2: strings = _context2.sent; - svgEditor = this; + svgEditor = _this; svgCanvas = svgEditor.canvas; saveSvgAction = '/+modify'; // Create upload target (hidden iframe) // Hiding by size instead of display to avoid FF console errors @@ -4905,10 +4911,10 @@ var svgEditorExtension_server_moinsave = (function () { $("