TODO: Besides splitting this out from previous commit, should really avoid markdown field in favor of modifying jsdoc to report wherever it lays out "prettyprint"; still probably missing some one-liners; see https://github.com/google/code-prettify; update builds to confirm new stackblur is working; add below to CHANGES; add back for eslint-plugin-jsdoc once merged (though need new version ^3.9.1); move any linting changes to other linting branch
- Refactoring (minor): Add favicon to canvas demo
- Linting (ESLint Markdown JavaScript): Add `eslint-plugin-markdown` with
slightly loosened config (`no-undef` and `padded-blocks` off and
`no-unused-vars` as a warning)
- Linting (ESLint JSDoc code comments): Add `eslint-plugin-jsdoc` and apply to
JSDoc code comments
- Linting (ESLint): Completely avoid unescaped tabs in files
- Docs (Linting): Add linting info file
- npm: Rename `copy-deps` script to `copy`
- Refactoring: Add stackblur-canvas as a dependency and copy it in (until such time as we can do so for canvg)
This commit is contained in:
@@ -324,15 +324,17 @@ function loadSvgString (str, callback) {
|
||||
|
||||
/**
|
||||
* @function module:SVGEditor~getImportLocale
|
||||
* @param {string} defaultLang
|
||||
* @param {string} defaultName
|
||||
* @param {PlainObject} defaults
|
||||
* @param {string} defaults.defaultLang
|
||||
* @param {string} defaults.defaultName
|
||||
* @returns {module:SVGEditor~ImportLocale}
|
||||
*/
|
||||
function getImportLocale ({defaultLang, defaultName}) {
|
||||
/**
|
||||
* @function module:SVGEditor~ImportLocale
|
||||
* @param {string} [name] Defaults to `defaultName` of {@link module:SVGEditor~getImportLocale}
|
||||
* @param {string} [lang=defaultLang] Defaults to `defaultLang` of {@link module:SVGEditor~getImportLocale}
|
||||
* @param {PlainObject} localeInfo
|
||||
* @param {string} [localeInfo.name] Defaults to `defaultName` of {@link module:SVGEditor~getImportLocale}
|
||||
* @param {string} [localeInfo.lang=defaultLang] Defaults to `defaultLang` of {@link module:SVGEditor~getImportLocale}
|
||||
* @returns {Promise} Resolves to {@link module:locale.LocaleStrings}
|
||||
*/
|
||||
return async function importLocale ({name = defaultName, lang = defaultLang} = {}) {
|
||||
@@ -2771,7 +2773,7 @@ editor.init = function () {
|
||||
|
||||
const allHolders = {};
|
||||
/**
|
||||
* @param {GenericObject.<string, module:SVGEditor.ToolButton>} holders Key is a selector
|
||||
* @param {PlainObject.<string, module:SVGEditor.ToolButton>} holders Key is a selector
|
||||
* @returns {undefined}
|
||||
*/
|
||||
const setupFlyouts = function (holders) {
|
||||
@@ -3440,8 +3442,9 @@ editor.init = function () {
|
||||
'updateCanvas',
|
||||
/**
|
||||
* @param {external:Window} win
|
||||
* @param {false} center
|
||||
* @param {module:math.XYObject} newCtr
|
||||
* @param {PlainObject} centerInfo
|
||||
* @param {false} centerInfo.center
|
||||
* @param {module:math.XYObject} centerInfo.newCtr
|
||||
* @listens module:svgcanvas.SvgCanvas#event:updateCanvas
|
||||
* @returns {undefined}
|
||||
*/
|
||||
@@ -6042,8 +6045,9 @@ editor.ready(() => {
|
||||
let extensionsAdded = false;
|
||||
const messageQueue = [];
|
||||
/**
|
||||
* @param {Any} data
|
||||
* @param {string} origin
|
||||
* @param {PlainObject} info
|
||||
* @param {Any} info.data
|
||||
* @param {string} info.origin
|
||||
* @fires module:svgcanvas.SvgCanvas#event:message
|
||||
* @returns {undefined}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user