diff --git a/badges/coverage-badge.svg b/badges/coverage-badge.svg
index 29f7a0bf..c77a98d4 100644
--- a/badges/coverage-badge.svg
+++ b/badges/coverage-badge.svg
@@ -1 +1 @@
-
+
diff --git a/badges/tests-badge.svg b/badges/tests-badge.svg
index 126a9c3c..5034b1b9 100644
--- a/badges/tests-badge.svg
+++ b/badges/tests-badge.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/dist/extensions/ext-connector.js b/dist/extensions/ext-connector.js
index 3116c1c4..b37d72b3 100644
--- a/dist/extensions/ext-connector.js
+++ b/dist/extensions/ext-connector.js
@@ -1,8 +1,6 @@
var svgEditorExtension_connector = (function () {
'use strict';
- /* eslint-disable unicorn/no-fn-reference-in-iterator */
-
/**
* @file ext-connector.js
*
diff --git a/dist/extensions/imagelib/openclipart.js b/dist/extensions/imagelib/openclipart.js
index 3d8d397f..b4d038b8 100644
--- a/dist/extensions/imagelib/openclipart.js
+++ b/dist/extensions/imagelib/openclipart.js
@@ -765,8 +765,7 @@
while (node.childNodes[j]) {
const cn = node.childNodes[j];
cn.remove(); // `j` should stay the same as removing will cause node to be present
- } // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
-
+ }
attVal.childNodes.forEach(_childrenToJML(node));
} else {
@@ -792,13 +791,11 @@
}
if (attVal.head) {
- // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
attVal.head.forEach(_appendJML(head));
}
}
if (attVal.body) {
- // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
attVal.body.forEach(_appendJMLOrText(body));
}
}
@@ -1067,7 +1064,7 @@
// Todo: Fix to allow application of stylesheets of style tags within fragments?
- return nodes.length <= 1 ? nodes[0] // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
+ return nodes.length <= 1 ? nodes[0] // eslint-disable-next-line
: nodes.reduce(_fragReducer, doc.createDocumentFragment()); // nodes;
}
diff --git a/dist/index-es.js b/dist/index-es.js
index 287fb42b..4177c70a 100644
--- a/dist/index-es.js
+++ b/dist/index-es.js
@@ -4826,7 +4826,7 @@ const getElem = supportsSelectors() ? function (id) {
}, 9, null).singleNodeValue;
} : function (id) {
// jQuery lookup: twice as slow as xpath in FF
- return $$1(svgroot_).find('[id=' + id + ']')[0];
+ return $$1(svgroot_).find(`[id=${id}]`)[0];
};
/**
* Assigns multiple attributes to an element.
@@ -5721,7 +5721,6 @@ class Command {
* @implements {module:history.HistoryCommand}
*/
-
class MoveElementCommand extends Command {
/**
* @param {Element} elem - The DOM element that was moved
@@ -6051,7 +6050,7 @@ class BatchCommand extends Command {
unapply(handler) {
super.unapply(handler, () => {
- this.stack.forEach(stackItem => {
+ this.stack.reverse().forEach(stackItem => {
console.assert(stackItem, 'stack item should not be null');
stackItem && stackItem.unapply(handler);
});
@@ -6282,6 +6281,7 @@ class UndoManager {
var hstry = /*#__PURE__*/Object.freeze({
__proto__: null,
HistoryEventTypes: HistoryEventTypes,
+ Command: Command,
MoveElementCommand: MoveElementCommand,
InsertElementCommand: InsertElementCommand,
RemoveElementCommand: RemoveElementCommand,
@@ -12953,7 +12953,7 @@ const init$6 = function (config, svgFactory) {
const getSelectorManager = () => selectorManager_;
-/* eslint-disable indent, unicorn/no-fn-reference-in-iterator */
+/* eslint-disable indent */
let $$a = jQueryPluginSVG(jQuery);
const {
MoveElementCommand: MoveElementCommand$1,
@@ -27221,7 +27221,7 @@ const jPicker = function ($) {
return $;
};
-/* eslint-disable unicorn/no-fn-reference-in-iterator */
+/* globals jQuery */
const $$b = jQuery;
let langParam;
/**
diff --git a/dist/index-es.min.js b/dist/index-es.min.js
index 8967276a..f7e58833 100644
--- a/dist/index-es.min.js
+++ b/dist/index-es.min.js
@@ -25,7 +25,7 @@ function P(e){const t=e.fn.attr;return e.fn.attr=function(e,n){const i=this.leng
* @license MIT
*
* @copyright 2010 Alexis Deveria, 2010 Jeff Schiller
- */let B,U={};const D=function(){return U},F=function(e){const t=B.getRoundDigits();return isNaN(e)?Array.isArray(e)?F(e[0])+","+F(e[1]):Number.parseFloat(e).toFixed(t)-0:Number(Number(e).toFixed(t))},z=function(e,t){return t=t||B.getBaseUnit(),F(e/U[t])},H=function(e,t,n){e.setAttribute(t,n)},q=function(e,t){if(!isNaN(t))return t-0;if("%"===t.substr(-1)){const n=t.substr(0,t.length-1)/100,i=B.getWidth(),s=B.getHeight();return j.includes(e)?n*i:V.includes(e)?n*s:n*Math.sqrt(i*i+s*s)/Math.sqrt(2)}const n=t.substr(-2);return t.substr(0,t.length-2)*U[n]},X=function(e,t,n){if(R.includes(e))return!isNaN(t)||(t=t.toLowerCase(),Object.keys(U).some(e=>new RegExp("^-?[\\d\\.]+"+e+"$").test(t)));if("id"===e){let e=!1;try{const i=B.getElement(t);e=Qe(i)||i===n}catch(e){}return e}return!0},W=document.createElementNS(t.SVG,"svg"),$=function(e,t,n){return{x:n.a*e+n.c*t+n.e,y:n.b*e+n.d*t+n.f}},Y=function(e){return 1===e.a&&0===e.b&&0===e.c&&1===e.d&&0===e.e&&0===e.f},Q=function(...e){const t=e.reduceRight((e,t)=>t.multiply(e));return Math.abs(t.a)<1e-14&&(t.a=0),Math.abs(t.b)<1e-14&&(t.b=0),Math.abs(t.c)<1e-14&&(t.c=0),Math.abs(t.d)<1e-14&&(t.d=0),Math.abs(t.e)<1e-14&&(t.e=0),Math.abs(t.f)<1e-14&&(t.f=0),t},K=function(e){if(!e)return!1;let t=e.numberOfItems;for(;t--;){const n=e.getItem(t);if(1===n.type&&!Y(n.matrix))return!0}return!1},Z=function(e,t,n,i,s){const o=$(e,t,s),r=$(e+n,t,s),a=$(e,t+i,s),l=$(e+n,t+i,s),c=Math.min(o.x,r.x,a.x,l.x),u=Math.max(o.x,r.x,a.x,l.x),d=Math.min(o.y,r.y,a.y,l.y);return{tl:o,tr:r,bl:a,br:l,aabox:{x:c,y:d,width:u-c,height:Math.max(o.y,r.y,a.y,l.y)-d}}},J=function(e,t,n){if(Qe(e))return W.createSVGTransformFromMatrix(W.createSVGMatrix());if(t=t||0,n=n||e.numberOfItems-1,(t=Number.parseInt(t))>(n=Number.parseInt(n))){const e=n;n=t,t=e}let i=W.createSVGMatrix();for(let s=t;s<=n;++s){const t=s>=0&&se.x&&t.ye.y},ie=P(jQuery),se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",oe="a,circle,ellipse,foreignObject,g,image,line,path,polygon,polyline,rect,svg,text,tspan,use,clipPath".split(",");let re=null,ae=null,le=null,ce=null;const ue=function(e){re=e,ae=e.getDOMDocument(),le=e.getDOMContainer(),ce=e.getSVGRoot()},de=e=>e.replace(/()/,"$1$2"),he=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")};function pe(e){if(e=me(e),window.btoa)return window.btoa(e);const t=new Array(4*Math.floor((e.length+2)/3));let n=0,i=0;do{const s=e.charCodeAt(n++),o=e.charCodeAt(n++),r=e.charCodeAt(n++),a=s>>2,l=(3&s)<<4|o>>4;let c=(15&o)<<2|r>>6,u=63&r;Number.isNaN(o)?(c=64,u=64):Number.isNaN(r)&&(u=64),t[i++]=se.charAt(a),t[i++]=se.charAt(l),t[i++]=se.charAt(c),t[i++]=se.charAt(u)}while(n>4,l=(15&s)<<4|o>>2,c=(3&o)<<6|r;t+=String.fromCharCode(a),64!==o&&(t+=String.fromCharCode(l)),64!==r&&(t+=String.fromCharCode(c))}while(nSVG-edit