- Linting: As per latest ash-nazg (unicorn updates)

- npm: Update devDeps.
This commit is contained in:
Brett Zamir
2020-07-19 22:32:40 +08:00
parent b620eb55bb
commit 54fd0975d7
19 changed files with 121 additions and 159 deletions

22
dist/index-umd.js vendored
View File

@@ -4832,7 +4832,6 @@
}, 9, null).singleNodeValue;
} : function (id) {
// jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$1(svgroot_).find('[id=' + id + ']')[0];
};
/**
@@ -5401,10 +5400,10 @@
* @param {PlainObject} [strings.cancel]
* @returns {external:jQuery}
*/
function jQueryPluginDBox($, strings = {
ok: 'Ok',
cancel: 'Cancel'
}) {
function jQueryPluginDBox($, {
ok: okString = 'Ok',
cancel: cancelString = 'Cancel'
} = {}) {
// This sets up alternative dialog boxes. They mostly work the same way as
// their UI counterparts, expect instead of returning the result, a callback
// needs to be included that returns the result as its first parameter.
@@ -5469,11 +5468,11 @@
function dbox(type, msg, defaultVal, opts, changeListener, checkbox) {
dialogContent.html('<p>' + msg.replace(/\n/g, '</p><p>') + '</p>').toggleClass('prompt', type === 'prompt');
btnHolder.empty();
const ok = $('<input type="button" data-ok="" value="' + strings.ok + '">').appendTo(btnHolder);
const ok = $('<input type="button" data-ok="" value="' + okString + '">').appendTo(btnHolder);
return new Promise((resolve, reject) => {
// eslint-disable-line promise/avoid-new
if (type !== 'alert') {
$('<input type="button" value="' + strings.cancel + '">').appendTo(btnHolder).click(function () {
$('<input type="button" value="' + cancelString + '">').appendTo(btnHolder).click(function () {
box.hide();
resolve(false);
});
@@ -9934,7 +9933,6 @@
// querySelector lookup
return this.svgElem_.querySelector('#' + id);
} // jQuery lookup: twice as slow as xpath in FF
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
return $$6(this.svgElem_).find('[id=' + id + ']')[0];
@@ -23755,7 +23753,6 @@
const d = o.split(',');
for (const href of d) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().addClass('disabled');
}
}
@@ -23781,7 +23778,6 @@
const d = o.split(',');
for (const href of d) {
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
$(this).find('A[href="' + href + '"]').parent().removeClass('disabled');
}
}
@@ -26169,7 +26165,6 @@
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');
setColorMode.call(that, e.target.value);
}
@@ -34421,11 +34416,8 @@
let tool;
const itool = curConfig.initTool,
container = $$c('#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);
/* eslint-enable unicorn/no-fn-reference-in-iterator */
if (preTool.length) {
tool = preTool;