- Docs: Mention lack of relative repo maintenance in issue template

- Linting (ESLint): As per latest ash-nazg
- npm: Update devDeps.
master
Brett Zamir 2020-04-29 13:07:22 +08:00
parent 3a494dfee9
commit e43d128a2f
21 changed files with 269 additions and 5679 deletions

View File

@ -3,6 +3,7 @@ name: Bug report
about: Create a report in case we may be able to help about: Create a report in case we may be able to help
--- ---
**PLEASE NOTE: This project is not currently being actively developed due to the core developers having moved on, and the only remaining maintainer merely applying occasional minor PRs or tweaks to keep the project alive. While you can file an issue, you should not expect any action, even if we label the issue.**
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is. A clear and concise description of what the bug is.

21
dist/index-es.js vendored
View File

@ -4113,7 +4113,7 @@ var InsertElementCommand = /*#__PURE__*/function (_Command2) {
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -4190,7 +4190,7 @@ var RemoveElementCommand = /*#__PURE__*/function (_Command3) {
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
@ -9252,6 +9252,7 @@ var getElem = supportsSelectors() ? function (id) {
}, 9, null).singleNodeValue; }, 9, null).singleNodeValue;
} : function (id) { } : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$2(svgroot_).find('[id=' + id + ']')[0]; return $$2(svgroot_).find('[id=' + id + ']')[0];
}; };
/** /**
@ -10245,8 +10246,7 @@ var Layer = /*#__PURE__*/function () {
}, { }, {
key: "removeGroup", key: "removeGroup",
value: function removeGroup() { value: function removeGroup() {
var parent = this.group_.parentNode; var group = this.group_.remove();
var group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }
@ -10619,6 +10619,7 @@ var Drawing = /*#__PURE__*/function () {
// querySelector lookup // querySelector lookup
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF } // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$5(this.svgElem_).find('[id=' + id + ']')[0]; return $$5(this.svgElem_).find('[id=' + id + ']')[0];
@ -24643,6 +24644,7 @@ function jQueryContextMenu($) {
try { try {
for (_iterator.s(); !(_step = _iterator.n()).done;) { for (_iterator.s(); !(_step = _iterator.n()).done;) {
var href = _step.value; var href = _step.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled'); $(this).find('A[href="' + href + '"]').parent().addClass('disabled');
} }
} catch (err) { } catch (err) {
@ -24678,6 +24680,7 @@ function jQueryContextMenu($) {
try { try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var href = _step2.value; var href = _step2.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled'); $(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
} }
} catch (err) { } catch (err) {
@ -27051,6 +27054,7 @@ var jPicker = function jPicker($) {
function radioClicked(e) { function radioClicked(e) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked'); $(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked');
setColorMode.call(that, e.target.value); setColorMode.call(that, e.target.value);
} }
@ -34527,7 +34531,7 @@ editor.init = function () {
{ {
this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity')); this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity'));
if (isNaN(this._paintOpacity)) { if (Number.isNaN(this._paintOpacity)) {
this._paintOpacity = 1.0; this._paintOpacity = 1.0;
} }
@ -35670,8 +35674,11 @@ editor.init = function () {
var tool; var tool;
var itool = curConfig.initTool, var itool = curConfig.initTool,
container = $$b('#tools_left, #svg_editor .tools_flyout'), container = $$b('#tools_left, #svg_editor .tools_flyout'),
preTool = container.find('#tool_' + itool),
/* eslint-disable unicorn/no-fn-reference-in-iterator */
preTool = container.find('#tool_' + itool),
regTool = container.find('#' + itool); regTool = container.find('#' + itool);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) { if (preTool.length) {
tool = preTool; tool = preTool;
@ -36336,7 +36343,7 @@ editor.ready = function (cb) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
// eslint-disable-line promise/avoid-new // eslint-disable-line promise/avoid-new
if (isReady) { if (isReady) {
resolve(cb()); // eslint-disable-line callback-return, promise/prefer-await-to-callbacks resolve(cb()); // eslint-disable-line node/callback-return, promise/prefer-await-to-callbacks
return; return;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

21
dist/index-umd.js vendored
View File

@ -4119,7 +4119,7 @@
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -4196,7 +4196,7 @@
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
@ -9258,6 +9258,7 @@
}, 9, null).singleNodeValue; }, 9, null).singleNodeValue;
} : function (id) { } : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$2(svgroot_).find('[id=' + id + ']')[0]; return $$2(svgroot_).find('[id=' + id + ']')[0];
}; };
/** /**
@ -10251,8 +10252,7 @@
}, { }, {
key: "removeGroup", key: "removeGroup",
value: function removeGroup() { value: function removeGroup() {
var parent = this.group_.parentNode; var group = this.group_.remove();
var group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }
@ -10625,6 +10625,7 @@
// querySelector lookup // querySelector lookup
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF } // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$5(this.svgElem_).find('[id=' + id + ']')[0]; return $$5(this.svgElem_).find('[id=' + id + ']')[0];
@ -24649,6 +24650,7 @@
try { try {
for (_iterator.s(); !(_step = _iterator.n()).done;) { for (_iterator.s(); !(_step = _iterator.n()).done;) {
var href = _step.value; var href = _step.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled'); $(this).find('A[href="' + href + '"]').parent().addClass('disabled');
} }
} catch (err) { } catch (err) {
@ -24684,6 +24686,7 @@
try { try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var href = _step2.value; var href = _step2.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled'); $(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
} }
} catch (err) { } catch (err) {
@ -27057,6 +27060,7 @@
function radioClicked(e) { function radioClicked(e) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked'); $(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked');
setColorMode.call(that, e.target.value); setColorMode.call(that, e.target.value);
} }
@ -34533,7 +34537,7 @@
{ {
this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity')); this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity'));
if (isNaN(this._paintOpacity)) { if (Number.isNaN(this._paintOpacity)) {
this._paintOpacity = 1.0; this._paintOpacity = 1.0;
} }
@ -35676,8 +35680,11 @@
var tool; var tool;
var itool = curConfig.initTool, var itool = curConfig.initTool,
container = $$b('#tools_left, #svg_editor .tools_flyout'), container = $$b('#tools_left, #svg_editor .tools_flyout'),
preTool = container.find('#tool_' + itool),
/* eslint-disable unicorn/no-fn-reference-in-iterator */
preTool = container.find('#tool_' + itool),
regTool = container.find('#' + itool); regTool = container.find('#' + itool);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) { if (preTool.length) {
tool = preTool; tool = preTool;
@ -36342,7 +36349,7 @@
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
// eslint-disable-line promise/avoid-new // eslint-disable-line promise/avoid-new
if (isReady) { if (isReady) {
resolve(cb()); // eslint-disable-line callback-return, promise/prefer-await-to-callbacks resolve(cb()); // eslint-disable-line node/callback-return, promise/prefer-await-to-callbacks
return; return;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4185,7 +4185,7 @@ var SvgCanvas = (function () {
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -4262,7 +4262,7 @@ var SvgCanvas = (function () {
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
@ -9324,6 +9324,7 @@ var SvgCanvas = (function () {
}, 9, null).singleNodeValue; }, 9, null).singleNodeValue;
} : function (id) { } : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$2(svgroot_).find('[id=' + id + ']')[0]; return $$2(svgroot_).find('[id=' + id + ']')[0];
}; };
/** /**
@ -9725,8 +9726,7 @@ var SvgCanvas = (function () {
}, { }, {
key: "removeGroup", key: "removeGroup",
value: function removeGroup() { value: function removeGroup() {
var parent = this.group_.parentNode; var group = this.group_.remove();
var group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }
@ -10099,6 +10099,7 @@ var SvgCanvas = (function () {
// querySelector lookup // querySelector lookup
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF } // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$4(this.svgElem_).find('[id=' + id + ']')[0]; return $$4(this.svgElem_).find('[id=' + id + ']')[0];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -193,6 +193,7 @@ function jQueryContextMenu ($) {
if (o !== undefined) { if (o !== undefined) {
const d = o.split(','); const d = o.split(',');
for (const href of d) { for (const href of d) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled'); $(this).find('A[href="' + href + '"]').parent().addClass('disabled');
} }
} }
@ -216,6 +217,7 @@ function jQueryContextMenu ($) {
if (o !== undefined) { if (o !== undefined) {
const d = o.split(','); const d = o.split(',');
for (const href of d) { for (const href of d) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled'); $(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
} }
} }

View File

@ -156,6 +156,7 @@ export class Drawing {
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} }
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $(this.svgElem_).find('[id=' + id + ']')[0]; return $(this.svgElem_).find('[id=' + id + ']')[0];
} }

View File

@ -223,7 +223,7 @@ export class InsertElementCommand extends Command {
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -280,7 +280,7 @@ export class RemoveElementCommand extends Command {
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);

View File

@ -1735,6 +1735,7 @@ const jPicker = function ($) {
* @returns {void} * @returns {void}
*/ */
function radioClicked (e) { function radioClicked (e) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked'); $(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked');
setColorMode.call(that, e.target.value); setColorMode.call(that, e.target.value);
} }

View File

@ -188,8 +188,7 @@ class Layer {
* @returns {SVGGElement} The layer SVG group that was just removed. * @returns {SVGGElement} The layer SVG group that was just removed.
*/ */
removeGroup () { removeGroup () {
const parent = this.group_.parentNode; const group = this.group_.remove();
const group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }

View File

@ -5902,8 +5902,10 @@ editor.init = function () {
let tool; let tool;
const itool = curConfig.initTool, const itool = curConfig.initTool,
container = $('#tools_left, #svg_editor .tools_flyout'), container = $('#tools_left, #svg_editor .tools_flyout'),
/* eslint-disable unicorn/no-fn-reference-in-iterator */
preTool = container.find('#tool_' + itool), preTool = container.find('#tool_' + itool),
regTool = container.find('#' + itool); regTool = container.find('#' + itool);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) { if (preTool.length) {
tool = preTool; tool = preTool;
} else if (regTool.length) { } else if (regTool.length) {

View File

@ -1220,6 +1220,7 @@ export const getElem = (supportsSelectors())
} }
: function (id) { : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $(svgroot_).find('[id=' + id + ']')[0]; return $(svgroot_).find('[id=' + id + ']')[0];
}; };

View File

@ -4116,7 +4116,7 @@
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -4193,7 +4193,7 @@
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
@ -9255,6 +9255,7 @@
}, 9, null).singleNodeValue; }, 9, null).singleNodeValue;
} : function (id) { } : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$2(svgroot_).find('[id=' + id + ']')[0]; return $$2(svgroot_).find('[id=' + id + ']')[0];
}; };
/** /**
@ -10248,8 +10249,7 @@
}, { }, {
key: "removeGroup", key: "removeGroup",
value: function removeGroup() { value: function removeGroup() {
var parent = this.group_.parentNode; var group = this.group_.remove();
var group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }
@ -10622,6 +10622,7 @@
// querySelector lookup // querySelector lookup
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF } // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$5(this.svgElem_).find('[id=' + id + ']')[0]; return $$5(this.svgElem_).find('[id=' + id + ']')[0];
@ -24646,6 +24647,7 @@
try { try {
for (_iterator.s(); !(_step = _iterator.n()).done;) { for (_iterator.s(); !(_step = _iterator.n()).done;) {
var href = _step.value; var href = _step.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled'); $(this).find('A[href="' + href + '"]').parent().addClass('disabled');
} }
} catch (err) { } catch (err) {
@ -24681,6 +24683,7 @@
try { try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var href = _step2.value; var href = _step2.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled'); $(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
} }
} catch (err) { } catch (err) {
@ -27054,6 +27057,7 @@
function radioClicked(e) { function radioClicked(e) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked'); $(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked');
setColorMode.call(that, e.target.value); setColorMode.call(that, e.target.value);
} }
@ -34530,7 +34534,7 @@
{ {
this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity')); this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity'));
if (isNaN(this._paintOpacity)) { if (Number.isNaN(this._paintOpacity)) {
this._paintOpacity = 1.0; this._paintOpacity = 1.0;
} }
@ -35673,8 +35677,11 @@
var tool; var tool;
var itool = curConfig.initTool, var itool = curConfig.initTool,
container = $$b('#tools_left, #svg_editor .tools_flyout'), container = $$b('#tools_left, #svg_editor .tools_flyout'),
preTool = container.find('#tool_' + itool),
/* eslint-disable unicorn/no-fn-reference-in-iterator */
preTool = container.find('#tool_' + itool),
regTool = container.find('#' + itool); regTool = container.find('#' + itool);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) { if (preTool.length) {
tool = preTool; tool = preTool;
@ -36339,7 +36346,7 @@
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
// eslint-disable-line promise/avoid-new // eslint-disable-line promise/avoid-new
if (isReady) { if (isReady) {
resolve(cb()); // eslint-disable-line callback-return, promise/prefer-await-to-callbacks resolve(cb()); // eslint-disable-line node/callback-return, promise/prefer-await-to-callbacks
return; return;
} }

5794
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -146,8 +146,8 @@
"@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3",
"@babel/preset-env": "^7.9.5", "@babel/preset-env": "^7.9.5",
"@babel/register": "^7.9.0", "@babel/register": "^7.9.0",
"@cypress/code-coverage": "^3.1.0", "@cypress/code-coverage": "^3.6.0",
"@cypress/fiddle": "^1.5.1", "@cypress/fiddle": "^1.18.1",
"@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2", "@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2",
"@mysticatea/eslint-plugin": "^13.0.0", "@mysticatea/eslint-plugin": "^13.0.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
@ -155,23 +155,23 @@
"copyfiles": "^2.2.0", "copyfiles": "^2.2.0",
"core-js-bundle": "^3.6.5", "core-js-bundle": "^3.6.5",
"coveradge": "^0.5.0", "coveradge": "^0.5.0",
"cypress": "^4.3.0", "cypress": "^4.5.0",
"cypress-axe": "^0.8.1", "cypress-axe": "^0.8.1",
"cypress-multi-reporters": "^1.2.4", "cypress-multi-reporters": "^1.2.4",
"deparam": "git+https://github.com/brettz9/deparam.git#updates", "deparam": "git+https://github.com/brettz9/deparam.git#updates",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-config-ash-nazg": "^19.0.0", "eslint-config-ash-nazg": "^21.0.0",
"eslint-config-standard": "^14.1.1", "eslint-config-standard": "^14.1.1",
"eslint-plugin-array-func": "^3.1.5", "eslint-plugin-array-func": "^3.1.5",
"eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-chai-expect": "^2.1.0",
"eslint-plugin-chai-expect-keywords": "^2.0.1", "eslint-plugin-chai-expect-keywords": "^2.0.1",
"eslint-plugin-chai-friendly": "^0.5.0", "eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-compat": "^3.5.1", "eslint-plugin-compat": "^3.5.1",
"eslint-plugin-cypress": "^2.10.3", "eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-html": "^6.0.1", "eslint-plugin-html": "^6.0.2",
"eslint-plugin-import": "^2.20.2", "eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsdoc": "^23.0.0", "eslint-plugin-jsdoc": "^24.0.0",
"eslint-plugin-markdown": "^1.0.2", "eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-mocha": "^6.3.0", "eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-mocha-cleanup": "^1.8.0", "eslint-plugin-mocha-cleanup": "^1.8.0",
@ -181,18 +181,18 @@
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.1",
"eslint-plugin-unicorn": "^18.0.1", "eslint-plugin-unicorn": "^19.0.1",
"frs-replace": "^2.0.1", "frs-replace": "^2.0.1",
"imageoptim-cli": "^3.0.2", "imageoptim-cli": "^3.0.2",
"jamilih": "^0.52.2", "jamilih": "^0.52.2",
"jsdoc": "^3.6.4", "jsdoc": "^3.6.4",
"license-badger": "^0.13.0", "license-badger": "^0.15.0",
"load-stylesheets": "^0.9.0", "load-stylesheets": "^0.9.0",
"mocha": "^7.1.1", "mocha": "^7.1.2",
"mocha-badge-generator": "^0.5.2", "mocha-badge-generator": "^0.5.2",
"mochawesome": "^6.0.0", "mochawesome": "^6.1.1",
"mochawesome-merge": "^4.0.3", "mochawesome-merge": "^4.0.3",
"mochawesome-report-generator": "^5.0.0", "mochawesome-report-generator": "^5.1.0",
"node-static": "^0.7.11", "node-static": "^0.7.11",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"nyc": "^15.0.1", "nyc": "^15.0.1",
@ -206,7 +206,7 @@
"remark-cli": "^8.0.0", "remark-cli": "^8.0.0",
"remark-lint-ordered-list-marker-value": "^2.0.0", "remark-lint-ordered-list-marker-value": "^2.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "2.6.0", "rollup": "2.7.3",
"rollup-plugin-babel": "^4.4.0", "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-re": "^1.0.7", "rollup-plugin-re": "^1.0.7",
"rollup-plugin-terser": "^5.3.0", "rollup-plugin-terser": "^5.3.0",

View File

@ -4116,7 +4116,7 @@
} }
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.elem.parentNode.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
@ -4193,7 +4193,7 @@
removeElementFromListMap(this.elem); removeElementFromListMap(this.elem);
this.parent = this.elem.parentNode; this.parent = this.elem.parentNode;
this.elem = this.parent.removeChild(this.elem); this.elem = this.elem.remove();
if (handler) { if (handler) {
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this); handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
@ -9255,6 +9255,7 @@
}, 9, null).singleNodeValue; }, 9, null).singleNodeValue;
} : function (id) { } : function (id) {
// jQuery lookup: twice as slow as xpath in FF // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$2(svgroot_).find('[id=' + id + ']')[0]; return $$2(svgroot_).find('[id=' + id + ']')[0];
}; };
/** /**
@ -10248,8 +10249,7 @@
}, { }, {
key: "removeGroup", key: "removeGroup",
value: function removeGroup() { value: function removeGroup() {
var parent = this.group_.parentNode; var group = this.group_.remove();
var group = parent.removeChild(this.group_);
this.group_ = undefined; this.group_ = undefined;
return group; return group;
} }
@ -10622,6 +10622,7 @@
// querySelector lookup // querySelector lookup
return this.svgElem_.querySelector('#' + id); return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF } // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$5(this.svgElem_).find('[id=' + id + ']')[0]; return $$5(this.svgElem_).find('[id=' + id + ']')[0];
@ -24646,6 +24647,7 @@
try { try {
for (_iterator.s(); !(_step = _iterator.n()).done;) { for (_iterator.s(); !(_step = _iterator.n()).done;) {
var href = _step.value; var href = _step.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled'); $(this).find('A[href="' + href + '"]').parent().addClass('disabled');
} }
} catch (err) { } catch (err) {
@ -24681,6 +24683,7 @@
try { try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var href = _step2.value; var href = _step2.value;
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled'); $(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
} }
} catch (err) { } catch (err) {
@ -27054,6 +27057,7 @@
function radioClicked(e) { function radioClicked(e) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked'); $(this).parents('tbody:first').find('input:radio[value!="' + e.target.value + '"]').removeAttr('checked');
setColorMode.call(that, e.target.value); setColorMode.call(that, e.target.value);
} }
@ -34530,7 +34534,7 @@
{ {
this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity')); this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity'));
if (isNaN(this._paintOpacity)) { if (Number.isNaN(this._paintOpacity)) {
this._paintOpacity = 1.0; this._paintOpacity = 1.0;
} }
@ -35673,8 +35677,11 @@
var tool; var tool;
var itool = curConfig.initTool, var itool = curConfig.initTool,
container = $$b('#tools_left, #svg_editor .tools_flyout'), container = $$b('#tools_left, #svg_editor .tools_flyout'),
preTool = container.find('#tool_' + itool),
/* eslint-disable unicorn/no-fn-reference-in-iterator */
preTool = container.find('#tool_' + itool),
regTool = container.find('#' + itool); regTool = container.find('#' + itool);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) { if (preTool.length) {
tool = preTool; tool = preTool;
@ -36339,7 +36346,7 @@
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
// eslint-disable-line promise/avoid-new // eslint-disable-line promise/avoid-new
if (isReady) { if (isReady) {
resolve(cb()); // eslint-disable-line callback-return, promise/prefer-await-to-callbacks resolve(cb()); // eslint-disable-line node/callback-return, promise/prefer-await-to-callbacks
return; return;
} }