- Optimization: Re-rerun image optimization per update

- Linting (ESLint): Adjust per now applied rules
- Testing: Accessibility test API update
- Docs: Clarify need for Node.js/npm being installed
- npm: Update devDeps and core-js-bundle copy; add new axe testing peer dep. axe-core
This commit is contained in:
Brett Zamir
2019-06-27 12:21:55 +08:00
parent c39d86cb58
commit efcde397ac
22 changed files with 375 additions and 254 deletions

View File

@@ -150,6 +150,7 @@ export default {
if (mode !== 'm') {
await $.process_cancel(message);
// eslint-disable-next-line require-atomic-updates
transferStopped = true;
// Should a message be sent back to the frame?

View File

@@ -242,6 +242,7 @@ export default {
// doesn't even want to remember their not wanting
// storage, so we don't set the cookie or continue on with
// setting storage on beforeunload
// eslint-disable-next-line require-atomic-updates
document.cookie = 'svgeditstore=' + encodeURIComponent(pref) + '; expires=Fri, 31 Dec 9999 23:59:59 GMT'; // 'prefsAndContent' | 'prefsOnly'
// If the URL was configured to always insist on a prompt, if
// the user does indicate a wish to store their info, we

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because one or more lines are too long

View File

@@ -303,12 +303,17 @@ export default function jQueryPluginJGraduate ($) {
$this.hide();
};
$.extend(true, $this, { // public properties, methods, and callbacks
// make a copy of the incoming paint
paint: new $.jGraduate.Paint({copy: $settings.paint}),
okCallback: typeof okCallback === 'function' ? okCallback : null,
cancelCallback: typeof cancelCallback === 'function' ? cancelCallback : null
});
$.extend(
true,
$this,
// public properties, methods, and callbacks
{
// make a copy of the incoming paint
paint: new $.jGraduate.Paint({copy: $settings.paint}),
okCallback: typeof okCallback === 'function' ? okCallback : null,
cancelCallback: typeof cancelCallback === 'function' ? cancelCallback : null
}
);
let // pos = $this.position(),
color = null;

View File

@@ -4841,14 +4841,17 @@ editor.init = function () {
// set icon size
setIconSize($('#iconsize').val());
/* eslint-disable require-atomic-updates */
// set grid setting
curConfig.gridSnapping = $('#grid_snapping_on')[0].checked;
curConfig.snappingStep = $('#grid_snapping_step').val();
curConfig.gridColor = $('#grid_color').val();
curConfig.showRulers = $('#show_rulers')[0].checked;
/* eslint-enable require-atomic-updates */
$('#rulers').toggle(curConfig.showRulers);
if (curConfig.showRulers) { updateRulers(); }
// eslint-disable-next-line require-atomic-updates
curConfig.baseUnit = $('#base_unit').val();
svgCanvas.setConfig(curConfig);
@@ -5682,7 +5685,8 @@ editor.init = function () {
'5/Shift+5': '#tools_ellipse_show'
};
return { /** @lends module:SVGEditor~Actions */
return {
/** @lends module:SVGEditor~Actions */
/**
* @returns {void}
*/
@@ -6263,6 +6267,7 @@ editor.init = function () {
importLocale: getImportLocale({defaultLang: lang, defaultName: ext.name})
});
}));
// eslint-disable-next-line require-atomic-updates
extsPreLang.length = 0;
} else {
loadedExtensionNames.forEach((loadedExtensionName) => {

View File

@@ -21,7 +21,8 @@ import './svgpathseg.js';
import jQueryPluginSVG from './jQuery.attr.js'; // Needed for SVG attribute setting and array form with `attr`
import jQueryPluginDBox from './dbox.js';
import * as draw from './draw.js'; // eslint-disable-line import/no-duplicates
import { // eslint-disable-line no-duplicate-imports
// eslint-disable-next-line no-duplicate-imports
import {
identifyLayers, createLayer, cloneLayer, deleteCurrentLayer,
setCurrentLayer, renameCurrentLayer, setCurrentLayerPosition,
setLayerVisibility, moveSelectedToLayer, mergeLayer, mergeAllLayers,
@@ -1201,6 +1202,7 @@ this.addExtension = async function (name, extInitFunc, {$: jq, importLocale}) {
extObj.name = name;
}
// eslint-disable-next-line require-atomic-updates
extensions[name] = extObj;
return call('extension_added', extObj);
};
@@ -3990,6 +3992,7 @@ this.rasterExport = async function (imgType, quality, exportWindowName, opts = {
const svg = this.svgCanvasToString();
if (!canvg) {
// eslint-disable-next-line require-atomic-updates
({canvg} = await importSetGlobal(curConfig.canvgPath + 'canvg.js', {
global: 'canvg'
}));

View File

@@ -14766,7 +14766,8 @@
if (extObj) {
extObj.name = name;
}
} // eslint-disable-next-line require-atomic-updates
extensions[name] = extObj;
return _context.abrupt("return", call('extension_added', extObj));
@@ -23224,8 +23225,8 @@
$this.hide();
};
$.extend(true, $this, {
// public properties, methods, and callbacks
$.extend(true, $this, // public properties, methods, and callbacks
{
// make a copy of the incoming paint
paint: new $.jGraduate.Paint({
copy: $settings.paint
@@ -34331,17 +34332,22 @@
case 11:
// set icon size
setIconSize($$b('#iconsize').val()); // set grid setting
setIconSize($$b('#iconsize').val());
/* eslint-disable require-atomic-updates */
// set grid setting
curConfig.gridSnapping = $$b('#grid_snapping_on')[0].checked;
curConfig.snappingStep = $$b('#grid_snapping_step').val();
curConfig.gridColor = $$b('#grid_color').val();
curConfig.showRulers = $$b('#show_rulers')[0].checked;
/* eslint-enable require-atomic-updates */
$$b('#rulers').toggle(curConfig.showRulers);
if (curConfig.showRulers) {
updateRulers();
}
} // eslint-disable-next-line require-atomic-updates
curConfig.baseUnit = $$b('#base_unit').val();
svgCanvas.setConfig(curConfig);
@@ -36363,6 +36369,7 @@
}));
case 15:
// eslint-disable-next-line require-atomic-updates
extsPreLang.length = 0;
_context17.next = 19;
break;