- Linting (JSDoc): Reenable jsdoc/valid-jsdoc as fixed; notes re: `valid-jsdoc` replacement; use same namepath
- npm: Update devDepmaster
parent
4289d131a2
commit
1d56d75837
|
@ -63,8 +63,9 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
|
// Remove this rule when fully migrated to eslint-plugin-jsdoc: https://github.com/gajus/eslint-plugin-jsdoc/issues/107
|
||||||
// These would otherwise currently break because of these issues:
|
// These would otherwise currently break because of these issues:
|
||||||
// 1. `event:` https://github.com/eslint/doctrine/issues/221 and https://github.com/Kuniwak/jsdoctypeparser/pull/49 with https://github.com/Kuniwak/jsdoctypeparser/issues/47
|
// 1. `event:` https://github.com/eslint/doctrine/issues/221
|
||||||
// 1. `@implements`/`@augments`/`@extends`/`@override`: https://github.com/eslint/doctrine/issues/222
|
// 1. `@implements`/`@augments`/`@extends`/`@override`: https://github.com/eslint/doctrine/issues/222
|
||||||
{
|
{
|
||||||
files: [
|
files: [
|
||||||
|
@ -73,7 +74,6 @@ module.exports = {
|
||||||
"editor/extensions/ext-eyedropper.js", "editor/extensions/ext-webappfind.js"
|
"editor/extensions/ext-eyedropper.js", "editor/extensions/ext-webappfind.js"
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
"jsdoc/valid-types": "off",
|
|
||||||
"valid-jsdoc": "off"
|
"valid-jsdoc": "off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
`loadFromString`, `loadFromDataURI` so known when ready and set
|
`loadFromString`, `loadFromDataURI` so known when ready and set
|
||||||
- Refactoring: Destructuring, templates, label Unicode code point
|
- Refactoring: Destructuring, templates, label Unicode code point
|
||||||
- Linting (JSDoc): Update per newly enforced `require-returns`; avoid
|
- Linting (JSDoc): Update per newly enforced `require-returns`; avoid
|
||||||
Closure syntax
|
Closure syntax; reenable `jsdoc/valid-jsdoc` as fixed; notes
|
||||||
|
re: valid-jsdoc replacement; use same namepath
|
||||||
- Docs (Refactoring): Formally specify `Promise` resolve type;
|
- Docs (Refactoring): Formally specify `Promise` resolve type;
|
||||||
add `typedef` for dialog result object; add an
|
add `typedef` for dialog result object; add an
|
||||||
`ArbitraryCallbackResult` type; prefer `void`
|
`ArbitraryCallbackResult` type; prefer `void`
|
||||||
|
|
|
@ -4358,7 +4358,7 @@ var canvg = (function (exports) {
|
||||||
* @param {Float} width
|
* @param {Float} width
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -4373,7 +4373,7 @@ var canvg = (function (exports) {
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @param {Float} val
|
* @param {Float} val
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
*
|
*
|
||||||
* @param {Node} o
|
* @param {Node} o
|
||||||
* @param {module:DOMPolyfill~ParentNode|module:DOMPolyfill~ChildNode} ps
|
* @param {module:DOMPolyfill~ParentNode|module:DOMPolyfill~ChildNode} ps
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function mixin(o, ps) {
|
function mixin(o, ps) {
|
||||||
if (!o) return;
|
if (!o) return;
|
||||||
|
|
|
@ -273,7 +273,7 @@ var svgEditorExtension_arrows = (function () {
|
||||||
/**
|
/**
|
||||||
* @param {Window} win
|
* @param {Window} win
|
||||||
* @param {!(string|Integer)} n
|
* @param {!(string|Integer)} n
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
svgCanvas.bind('setnonce', setArrowNonce);
|
svgCanvas.bind('setnonce', setArrowNonce);
|
||||||
|
|
|
@ -135,7 +135,7 @@ var svgEditorExtension_connector = (function () {
|
||||||
var addThis;
|
var addThis;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function add() {
|
function add() {
|
||||||
|
@ -347,7 +347,7 @@ var svgEditorExtension_connector = (function () {
|
||||||
})();
|
})();
|
||||||
/**
|
/**
|
||||||
* Do on reset.
|
* Do on reset.
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,8 @@ var svgEditorExtension_eyedropper = (function () {
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-selectedChanged|module:svgcanvas.SvgCanvas#event:ext-elementChanged} opts
|
* @param {module:svgcanvas.SvgCanvas#event:ext_selectedChanged|module:svgcanvas.SvgCanvas#event:ext_elementChanged} opts
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -132,7 +132,7 @@ var svgEditorExtension_foreignobject = (function () {
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @param {boolean} on
|
* @param {boolean} on
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ var svgEditorExtension_grid = (function () {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Float} zoom
|
* @param {Float} zoom
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -237,7 +237,7 @@ var svgEditorExtension_imagelib = (function () {
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pending = {};
|
pending = {};
|
||||||
|
@ -542,7 +542,7 @@ var svgEditorExtension_imagelib = (function () {
|
||||||
}(), true);
|
}(), true);
|
||||||
/**
|
/**
|
||||||
* @param {boolean} show
|
* @param {boolean} show
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -41,7 +41,7 @@ var svgEditorExtension_mathjax = (function () {
|
||||||
* Add any of the whitelisted attributes to the script tag.
|
* Add any of the whitelisted attributes to the script tag.
|
||||||
* @param {HTMLScriptElement} script
|
* @param {HTMLScriptElement} script
|
||||||
* @param {PlainObject.<string, string>} atts
|
* @param {PlainObject.<string, string>} atts
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ var svgEditorExtension_mathjax = (function () {
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function scriptOnError() {
|
function scriptOnError() {
|
||||||
|
@ -76,7 +76,7 @@ var svgEditorExtension_mathjax = (function () {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ var svgEditorExtension_mathjax = (function () {
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -416,7 +416,7 @@ var svgEditorExtension_placemark = (function () {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {boolean} on
|
* @param {boolean} on
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -4358,7 +4358,7 @@ var svgEditorExtension_server_moinsave = (function () {
|
||||||
* @param {Float} width
|
* @param {Float} width
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -4373,7 +4373,7 @@ var svgEditorExtension_server_moinsave = (function () {
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @param {Float} val
|
* @param {Float} val
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4358,7 +4358,7 @@ var svgEditorExtension_server_opensave = (function () {
|
||||||
* @param {Float} width
|
* @param {Float} width
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -4373,7 +4373,7 @@ var svgEditorExtension_server_opensave = (function () {
|
||||||
* @param {Float} height
|
* @param {Float} height
|
||||||
* @param {Integer} rgba
|
* @param {Integer} rgba
|
||||||
* @param {Float} val
|
* @param {Float} val
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -4879,7 +4879,7 @@ var svgEditorExtension_server_opensave = (function () {
|
||||||
/**
|
/**
|
||||||
* Submit the form, empty its contents for reuse and show
|
* Submit the form, empty its contents for reuse and show
|
||||||
* uploading message.
|
* uploading message.
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
|
@ -5188,7 +5188,7 @@ var svgEditorExtension_server_opensave = (function () {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {external:jQuery} form
|
* @param {external:jQuery} form
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Create the input elements
|
// Create the input elements
|
||||||
|
|
|
@ -205,7 +205,7 @@ var svgEditorExtension_shapes = (function () {
|
||||||
curLib = library.basic;
|
curLib = library.basic;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buttons = [{
|
buttons = [{
|
||||||
|
|
|
@ -117,7 +117,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
/**
|
/**
|
||||||
* Replace `storagePrompt` parameter within URL.
|
* Replace `storagePrompt` parameter within URL.
|
||||||
* @param {string} val
|
* @param {string} val
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function replaceStoragePrompt(val) {
|
function replaceStoragePrompt(val) {
|
||||||
|
@ -136,7 +136,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
* Sets SVG content as a string with "svgedit-" and the current
|
* Sets SVG content as a string with "svgedit-" and the current
|
||||||
* canvas name as namespace.
|
* canvas name as namespace.
|
||||||
* @param {string} val
|
* @param {string} val
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
/**
|
/**
|
||||||
* Set the cookie to expire.
|
* Set the cookie to expire.
|
||||||
* @param {string} cookie
|
* @param {string} cookie
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Expire the storage cookie.
|
* Expire the storage cookie.
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Empties storage for each of the current preferences.
|
* Empties storage for each of the current preferences.
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ var svgEditorExtension_storage = (function () {
|
||||||
* content into storage)
|
* content into storage)
|
||||||
* 2. Use localStorage to set SVG contents (potentially too large to allow in cookies)
|
* 2. Use localStorage to set SVG contents (potentially too large to allow in cookies)
|
||||||
* 3. Use localStorage (where available) or cookies to set preferences.
|
* 3. Use localStorage (where available) or cookies to set preferences.
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ var svgEditorExtension_webappfind = (function () {
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:message} data
|
* @param {module:svgcanvas.SvgCanvas#event:message} data
|
||||||
* @listens module:svgcanvas.SvgCanvas#event:message
|
* @listens module:svgcanvas.SvgCanvas#event:message
|
||||||
* @throws {Error} Unexpected event type
|
* @throws {Error} Unexpected event type
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function (win, _ref2) {
|
function (win, _ref2) {
|
||||||
var data = _ref2.data,
|
var data = _ref2.data,
|
||||||
|
|
|
@ -3009,7 +3009,7 @@
|
||||||
/**
|
/**
|
||||||
* Shows results after query submission.
|
* Shows results after query submission.
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @returns {undefined}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function processResults(_x) {
|
function processResults(_x) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -158,7 +158,7 @@ In addition to your own extension's locale strings,
|
||||||
[`langReady`]{@link module:svgcanvas.ExtensionInitResponse#langReady}
|
[`langReady`]{@link module:svgcanvas.ExtensionInitResponse#langReady}
|
||||||
also has access to the global internationalization strings through the
|
also has access to the global internationalization strings through the
|
||||||
`uiStrings` property on the object passed to it (see
|
`uiStrings` property on the object passed to it (see
|
||||||
[event:ext-langReady]{@link module:svgcanvas.SvgCanvas#event:ext-langReady}).
|
[event:ext_langReady]{@link module:svgcanvas.SvgCanvas#event:ext_langReady}).
|
||||||
|
|
||||||
See also [LocaleDocs]{@tutorial LocaleDocs}, including for information on
|
See also [LocaleDocs]{@tutorial LocaleDocs}, including for information on
|
||||||
formatting of locale strings (the current lack of any standard beyond a
|
formatting of locale strings (the current lack of any standard beyond a
|
||||||
|
|
|
@ -42,7 +42,7 @@ let editorContext_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @function module:coords.init
|
* @function module:coords.init
|
||||||
* @param {module:coords.EditorContext} editorContext
|
* @param {module:svgcanvas.SvgCanvas#event:pointsAdded} editorContext
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
export const init = function (editorContext) {
|
export const init = function (editorContext) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-selectedChanged|module:svgcanvas.SvgCanvas#event:ext-elementChanged} opts
|
* @param {module:svgcanvas.SvgCanvas#event:ext_selectedChanged|module:svgcanvas.SvgCanvas#event:ext_elementChanged} opts
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function getStyle (opts) {
|
function getStyle (opts) {
|
||||||
|
|
|
@ -126,7 +126,7 @@ export const init = (editor) => {
|
||||||
/**
|
/**
|
||||||
* @function module:locale.readLang
|
* @function module:locale.readLang
|
||||||
* @param {module:locale.LocaleStrings} langData See {@tutorial LocaleDocs}
|
* @param {module:locale.LocaleStrings} langData See {@tutorial LocaleDocs}
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
|
* @fires module:svgcanvas.SvgCanvas#event:ext_addLangData
|
||||||
* @returns {Promise<module:locale.LangAndData>} Resolves to [`LangAndData`]{@link module:locale.LangAndData}
|
* @returns {Promise<module:locale.LangAndData>} Resolves to [`LangAndData`]{@link module:locale.LangAndData}
|
||||||
*/
|
*/
|
||||||
export const readLang = async function (langData) {
|
export const readLang = async function (langData) {
|
||||||
|
@ -363,9 +363,9 @@ export const readLang = async function (langData) {
|
||||||
* @param {string} givenParam
|
* @param {string} givenParam
|
||||||
* @param {string[]} goodLangs
|
* @param {string[]} goodLangs
|
||||||
* @param {{langPath: string}} conf
|
* @param {{langPath: string}} conf
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
|
* @fires module:svgcanvas.SvgCanvas#event:ext_addLangData
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langChanged
|
||||||
* @returns {Promise<module:locale.LangAndData>} Resolves to result of {@link module:locale.readLang}
|
* @returns {Promise<module:locale.LangAndData>} Resolves to result of {@link module:locale.readLang}
|
||||||
*/
|
*/
|
||||||
export const putLocale = async function (givenParam, goodLangs, conf) {
|
export const putLocale = async function (givenParam, goodLangs, conf) {
|
||||||
|
|
|
@ -794,9 +794,9 @@ editor.init = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
|
* @fires module:svgcanvas.SvgCanvas#event:ext_addLangData
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langChanged
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:extensions_added
|
* @fires module:svgcanvas.SvgCanvas#event:extensions_added
|
||||||
* @returns {Promise<module:locale.LangAndData>} Resolves to result of {@link module:locale.readLang}
|
* @returns {Promise<module:locale.LangAndData>} Resolves to result of {@link module:locale.readLang}
|
||||||
*/
|
*/
|
||||||
|
@ -2145,7 +2145,7 @@ editor.init = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-toolButtonStateUpdate
|
* @fires module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const updateToolButtonState = function () {
|
const updateToolButtonState = function () {
|
||||||
|
@ -2185,7 +2185,7 @@ editor.init = function () {
|
||||||
|
|
||||||
svgCanvas.runExtensions(
|
svgCanvas.runExtensions(
|
||||||
'toolButtonStateUpdate',
|
'toolButtonStateUpdate',
|
||||||
/** @type {module:svgcanvas.SvgCanvas#event:ext-toolButtonStateUpdate} */ {
|
/** @type {module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate} */ {
|
||||||
nofill: bNoFill,
|
nofill: bNoFill,
|
||||||
nostroke: bNoStroke
|
nostroke: bNoStroke
|
||||||
}
|
}
|
||||||
|
@ -2536,7 +2536,7 @@ editor.init = function () {
|
||||||
* @param {external:Window} win
|
* @param {external:Window} win
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:selected} elems Array of elements that were selected
|
* @param {module:svgcanvas.SvgCanvas#event:selected} elems Array of elements that were selected
|
||||||
* @listens module:svgcanvas.SvgCanvas#event:selected
|
* @listens module:svgcanvas.SvgCanvas#event:selected
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-selectedChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_selectedChanged
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const selectedChanged = function (win, elems) {
|
const selectedChanged = function (win, elems) {
|
||||||
|
@ -2561,7 +2561,7 @@ editor.init = function () {
|
||||||
// Deal with pathedit mode
|
// Deal with pathedit mode
|
||||||
togglePathEditMode(isNode, elems);
|
togglePathEditMode(isNode, elems);
|
||||||
updateContextPanel();
|
updateContextPanel();
|
||||||
svgCanvas.runExtensions('selectedChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext-selectedChanged} */ {
|
svgCanvas.runExtensions('selectedChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext_selectedChanged} */ {
|
||||||
elems,
|
elems,
|
||||||
selectedElement,
|
selectedElement,
|
||||||
multiselected
|
multiselected
|
||||||
|
@ -2574,7 +2574,7 @@ editor.init = function () {
|
||||||
* @param {external:Window} win
|
* @param {external:Window} win
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:transition} elems
|
* @param {module:svgcanvas.SvgCanvas#event:transition} elems
|
||||||
* @listens module:svgcanvas.SvgCanvas#event:transition
|
* @listens module:svgcanvas.SvgCanvas#event:transition
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-elementTransition
|
* @fires module:svgcanvas.SvgCanvas#event:ext_elementTransition
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const elementTransition = function (win, elems) {
|
const elementTransition = function (win, elems) {
|
||||||
|
@ -2603,7 +2603,7 @@ editor.init = function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
svgCanvas.runExtensions('elementTransition', /** @type {module:svgcanvas.SvgCanvas#event:ext-elementTransition} */ {
|
svgCanvas.runExtensions('elementTransition', /** @type {module:svgcanvas.SvgCanvas#event:ext_elementTransition} */ {
|
||||||
elems
|
elems
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -2622,7 +2622,7 @@ editor.init = function () {
|
||||||
* @param {external:Window} win
|
* @param {external:Window} win
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:changed} elems
|
* @param {module:svgcanvas.SvgCanvas#event:changed} elems
|
||||||
* @listens module:svgcanvas.SvgCanvas#event:changed
|
* @listens module:svgcanvas.SvgCanvas#event:changed
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-elementChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_elementChanged
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const elementChanged = function (win, elems) {
|
const elementChanged = function (win, elems) {
|
||||||
|
@ -2664,7 +2664,7 @@ editor.init = function () {
|
||||||
paintBox.stroke.update();
|
paintBox.stroke.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
svgCanvas.runExtensions('elementChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext-elementChanged} */ {
|
svgCanvas.runExtensions('elementChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext_elementChanged} */ {
|
||||||
elems
|
elems
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -4432,7 +4432,7 @@ editor.init = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-onNewDocument
|
* @fires module:svgcanvas.SvgCanvas#event:ext_onNewDocument
|
||||||
* @returns {Promise<void>} Resolves to `undefined`
|
* @returns {Promise<void>} Resolves to `undefined`
|
||||||
*/
|
*/
|
||||||
const clickClear = async function () {
|
const clickClear = async function () {
|
||||||
|
@ -5361,7 +5361,7 @@ editor.init = function () {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Float} delta
|
* @param {Float} delta
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-workareaResized
|
* @fires module:svgcanvas.SvgCanvas#event:ext_workareaResized
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const changeSidePanelWidth = function (delta) {
|
const changeSidePanelWidth = function (delta) {
|
||||||
|
@ -6214,8 +6214,8 @@ editor.init = function () {
|
||||||
* @function module:SVGEditor.setLang
|
* @function module:SVGEditor.setLang
|
||||||
* @param {string} lang The language code
|
* @param {string} lang The language code
|
||||||
* @param {module:locale.LocaleStrings} allStrings See {@tutorial LocaleDocs}
|
* @param {module:locale.LocaleStrings} allStrings See {@tutorial LocaleDocs}
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_langChanged
|
||||||
* @returns {Promise<void>} A Promise which resolves to `undefined`
|
* @returns {Promise<void>} A Promise which resolves to `undefined`
|
||||||
*/
|
*/
|
||||||
const setLang = editor.setLang = async function (lang, allStrings) {
|
const setLang = editor.setLang = async function (lang, allStrings) {
|
||||||
|
@ -6262,13 +6262,13 @@ editor.init = function () {
|
||||||
svgCanvas.runExtension(
|
svgCanvas.runExtension(
|
||||||
loadedExtensionName,
|
loadedExtensionName,
|
||||||
'langReady',
|
'langReady',
|
||||||
/** @type {module:svgcanvas.SvgCanvas#event:ext-langReady} */ {
|
/** @type {module:svgcanvas.SvgCanvas#event:ext_langReady} */ {
|
||||||
lang, uiStrings, importLocale: getImportLocale({defaultLang: lang, defaultName: loadedExtensionName})
|
lang, uiStrings, importLocale: getImportLocale({defaultLang: lang, defaultName: loadedExtensionName})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
svgCanvas.runExtensions('langChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext-langChanged} */ lang);
|
svgCanvas.runExtensions('langChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext_langChanged} */ lang);
|
||||||
|
|
||||||
// Update flyout tooltips
|
// Update flyout tooltips
|
||||||
setFlyoutTitles();
|
setFlyoutTitles();
|
||||||
|
@ -6300,7 +6300,7 @@ editor.init = function () {
|
||||||
* returning an object with a `data` property set to its locales (to be
|
* returning an object with a `data` property set to its locales (to be
|
||||||
* merged with regular locales).
|
* merged with regular locales).
|
||||||
* @param {string} langParam
|
* @param {string} langParam
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
|
* @fires module:svgcanvas.SvgCanvas#event:ext_addLangData
|
||||||
* @todo Can we forego this in favor of `langReady` (or forego `langReady`)?
|
* @todo Can we forego this in favor of `langReady` (or forego `langReady`)?
|
||||||
* @returns {module:locale.AddLangExtensionLocaleData[]}
|
* @returns {module:locale.AddLangExtensionLocaleData[]}
|
||||||
*/
|
*/
|
||||||
|
@ -6311,7 +6311,7 @@ editor.init = function () {
|
||||||
* @function
|
* @function
|
||||||
* @type {module:svgcanvas.ExtensionVarBuilder}
|
* @type {module:svgcanvas.ExtensionVarBuilder}
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @returns {module:svgcanvas.SvgCanvas#event:ext-addLangData}
|
* @returns {module:svgcanvas.SvgCanvas#event:ext_addLangData}
|
||||||
*/
|
*/
|
||||||
(name) => { // We pass in a function as we don't know the extension name here when defining this `addLangData` method
|
(name) => { // We pass in a function as we don't know the extension name here when defining this `addLangData` method
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ this.runExtension = function (name, action, vars) {
|
||||||
/**
|
/**
|
||||||
* @callback module:svgcanvas.ExtensionVarBuilder
|
* @callback module:svgcanvas.ExtensionVarBuilder
|
||||||
* @param {string} name The name of the extension
|
* @param {string} name The name of the extension
|
||||||
* @returns {module:svgcanvas.SvgCanvas#event:ext-addLangData}
|
* @returns {module:svgcanvas.SvgCanvas#event:ext_addLangData}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @callback module:svgcanvas.ExtensionNameFilter
|
* @callback module:svgcanvas.ExtensionNameFilter
|
||||||
|
@ -1018,7 +1018,7 @@ this.runExtension = function (name, action, vars) {
|
||||||
* @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together
|
* @todo Would be easier to document if passing in object with key of action and vars as value; could then define an interface which tied both together
|
||||||
* @function module:svgcanvas.SvgCanvas#runExtensions
|
* @function module:svgcanvas.SvgCanvas#runExtensions
|
||||||
* @param {"mouseDown"|"mouseMove"|"mouseUp"|"zoomChanged"|"IDsUpdated"|"canvasUpdated"|"toolButtonStateUpdate"|"selectedChanged"|"elementTransition"|"elementChanged"|"langReady"|"langChanged"|"addLangData"|"onNewDocument"|"workareaResized"} action
|
* @param {"mouseDown"|"mouseMove"|"mouseUp"|"zoomChanged"|"IDsUpdated"|"canvasUpdated"|"toolButtonStateUpdate"|"selectedChanged"|"elementTransition"|"elementChanged"|"langReady"|"langChanged"|"addLangData"|"onNewDocument"|"workareaResized"} action
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-mouseDown|module:svgcanvas.SvgCanvas#event:ext-mouseMove|module:svgcanvas.SvgCanvas#event:ext-mouseUp|module:svgcanvas.SvgCanvas#event:ext-zoomChanged|module:svgcanvas.SvgCanvas#event:ext-IDsUpdated|module:svgcanvas.SvgCanvas#event:ext-canvasUpdated|module:svgcanvas.SvgCanvas#event:ext-toolButtonStateUpdate|module:svgcanvas.SvgCanvas#event:ext-selectedChanged|module:svgcanvas.SvgCanvas#event:ext-elementTransition|module:svgcanvas.SvgCanvas#event:ext-elementChanged|module:svgcanvas.SvgCanvas#event:ext-langReady|module:svgcanvas.SvgCanvas#event:ext-langChanged|module:svgcanvas.SvgCanvas#event:ext-addLangData|module:svgcanvas.SvgCanvas#event:ext-onNewDocument|module:svgcanvas.SvgCanvas#event:ext-workareaResized|module:svgcanvas.ExtensionVarBuilder} [vars]
|
* @param {module:svgcanvas.SvgCanvas#event:ext_mouseDown|module:svgcanvas.SvgCanvas#event:ext_mouseMove|module:svgcanvas.SvgCanvas#event:ext_mouseUp|module:svgcanvas.SvgCanvas#event:ext_zoomChanged|module:svgcanvas.SvgCanvas#event:ext_IDsUpdated|module:svgcanvas.SvgCanvas#event:ext_canvasUpdated|module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate|module:svgcanvas.SvgCanvas#event:ext_selectedChanged|module:svgcanvas.SvgCanvas#event:ext_elementTransition|module:svgcanvas.SvgCanvas#event:ext_elementChanged|module:svgcanvas.SvgCanvas#event:ext_langReady|module:svgcanvas.SvgCanvas#event:ext_langChanged|module:svgcanvas.SvgCanvas#event:ext_addLangData|module:svgcanvas.SvgCanvas#event:ext_onNewDocument|module:svgcanvas.SvgCanvas#event:ext_workareaResized|module:svgcanvas.ExtensionVarBuilder} [vars]
|
||||||
* @param {boolean} [returnArray]
|
* @param {boolean} [returnArray]
|
||||||
* @param {module:svgcanvas.ExtensionNameFilter} nameFilter
|
* @param {module:svgcanvas.ExtensionNameFilter} nameFilter
|
||||||
* @returns {GenericArray.<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus.
|
* @returns {GenericArray.<module:svgcanvas.ExtensionStatus>|module:svgcanvas.ExtensionStatus|false} See {@tutorial ExtensionDocs} on the ExtensionStatus.
|
||||||
|
@ -1066,83 +1066,83 @@ const runExtensions = this.runExtensions = function (action, vars, returnArray,
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#mouseDown
|
* @function module:svgcanvas.ExtensionInitResponse#mouseDown
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-mouseDown} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_mouseDown} arg
|
||||||
* @returns {void|module:svgcanvas.ExtensionMouseDownStatus}
|
* @returns {void|module:svgcanvas.ExtensionMouseDownStatus}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#mouseMove
|
* @function module:svgcanvas.ExtensionInitResponse#mouseMove
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-mouseMove} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_mouseMove} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#mouseUp
|
* @function module:svgcanvas.ExtensionInitResponse#mouseUp
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-mouseUp} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_mouseUp} arg
|
||||||
* @returns {module:svgcanvas.ExtensionMouseUpStatus}
|
* @returns {module:svgcanvas.ExtensionMouseUpStatus}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#zoomChanged
|
* @function module:svgcanvas.ExtensionInitResponse#zoomChanged
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-zoomChanged} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_zoomChanged} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#IDsUpdated
|
* @function module:svgcanvas.ExtensionInitResponse#IDsUpdated
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-IDsUpdated} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_IDsUpdated} arg
|
||||||
* @returns {module:svgcanvas.ExtensionIDsUpdatedStatus}
|
* @returns {module:svgcanvas.ExtensionIDsUpdatedStatus}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#canvasUpdated
|
* @function module:svgcanvas.ExtensionInitResponse#canvasUpdated
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-canvasUpdated} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_canvasUpdated} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#toolButtonStateUpdate
|
* @function module:svgcanvas.ExtensionInitResponse#toolButtonStateUpdate
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-toolButtonStateUpdate} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#selectedChanged
|
* @function module:svgcanvas.ExtensionInitResponse#selectedChanged
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-selectedChanged} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_selectedChanged} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#elementTransition
|
* @function module:svgcanvas.ExtensionInitResponse#elementTransition
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-elementTransition} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_elementTransition} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#elementChanged
|
* @function module:svgcanvas.ExtensionInitResponse#elementChanged
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-elementChanged} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_elementChanged} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#langReady
|
* @function module:svgcanvas.ExtensionInitResponse#langReady
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-langReady} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_langReady} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#langChanged
|
* @function module:svgcanvas.ExtensionInitResponse#langChanged
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-langChanged} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_langChanged} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#addLangData
|
* @function module:svgcanvas.ExtensionInitResponse#addLangData
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-addLangData} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_addLangData} arg
|
||||||
* @returns {Promise<module:locale.ExtensionLocaleData>} Resolves to {@link module:locale.ExtensionLocaleData}
|
* @returns {Promise<module:locale.ExtensionLocaleData>} Resolves to {@link module:locale.ExtensionLocaleData}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#onNewDocument
|
* @function module:svgcanvas.ExtensionInitResponse#onNewDocument
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-onNewDocument} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_onNewDocument} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#workareaResized
|
* @function module:svgcanvas.ExtensionInitResponse#workareaResized
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-workareaResized} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_workareaResized} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @function module:svgcanvas.ExtensionInitResponse#callback
|
* @function module:svgcanvas.ExtensionInitResponse#callback
|
||||||
* @this module:SVGEditor
|
* @this module:SVGEditor
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:ext-callback} arg
|
* @param {module:svgcanvas.SvgCanvas#event:ext_callback} arg
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1727,7 +1727,7 @@ const getBsplinePoint = function (t) {
|
||||||
* - When we are in select mode, select the element, remember the position
|
* - When we are in select mode, select the element, remember the position
|
||||||
* and do nothing else.
|
* and do nothing else.
|
||||||
* @param {MouseEvent} evt
|
* @param {MouseEvent} evt
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-mouseDown
|
* @fires module:svgcanvas.SvgCanvas#event:ext_mouseDown
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const mouseDown = function (evt) {
|
const mouseDown = function (evt) {
|
||||||
|
@ -2088,14 +2088,14 @@ const mouseDown = function (evt) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main (left) mouse button is held down on the canvas area
|
* The main (left) mouse button is held down on the canvas area
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-mouseDown
|
* @event module:svgcanvas.SvgCanvas#event:ext_mouseDown
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {MouseEvent} event The event object
|
* @property {MouseEvent} event The event object
|
||||||
* @property {Float} start_x x coordinate on canvas
|
* @property {Float} start_x x coordinate on canvas
|
||||||
* @property {Float} start_y y coordinate on canvas
|
* @property {Float} start_y y coordinate on canvas
|
||||||
* @property {Element[]} selectedElements An array of the selected Elements
|
* @property {Element[]} selectedElements An array of the selected Elements
|
||||||
*/
|
*/
|
||||||
const extResult = runExtensions('mouseDown', /** @type {module:svgcanvas.SvgCanvas#event:ext-mouseDown} */ {
|
const extResult = runExtensions('mouseDown', /** @type {module:svgcanvas.SvgCanvas#event:ext_mouseDown} */ {
|
||||||
event: evt,
|
event: evt,
|
||||||
start_x: startX,
|
start_x: startX,
|
||||||
start_y: startY,
|
start_y: startY,
|
||||||
|
@ -2115,7 +2115,7 @@ const mouseDown = function (evt) {
|
||||||
*
|
*
|
||||||
* @param {MouseEvent} evt
|
* @param {MouseEvent} evt
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:transition
|
* @fires module:svgcanvas.SvgCanvas#event:transition
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-mouseMove
|
* @fires module:svgcanvas.SvgCanvas#event:ext_mouseMove
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const mouseMove = function (evt) {
|
const mouseMove = function (evt) {
|
||||||
|
@ -2540,14 +2540,14 @@ const mouseMove = function (evt) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mouse has moved on the canvas area
|
* The mouse has moved on the canvas area
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-mouseMove
|
* @event module:svgcanvas.SvgCanvas#event:ext_mouseMove
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {MouseEvent} event The event object
|
* @property {MouseEvent} event The event object
|
||||||
* @property {Float} mouse_x x coordinate on canvas
|
* @property {Float} mouse_x x coordinate on canvas
|
||||||
* @property {Float} mouse_y y coordinate on canvas
|
* @property {Float} mouse_y y coordinate on canvas
|
||||||
* @property {Element} selected Refers to the first selected element
|
* @property {Element} selected Refers to the first selected element
|
||||||
*/
|
*/
|
||||||
runExtensions('mouseMove', /** @type {module:svgcanvas.SvgCanvas#event:ext-mouseMove} */ {
|
runExtensions('mouseMove', /** @type {module:svgcanvas.SvgCanvas#event:ext_mouseMove} */ {
|
||||||
event: evt,
|
event: evt,
|
||||||
mouse_x: mouseX,
|
mouse_x: mouseX,
|
||||||
mouse_y: mouseY,
|
mouse_y: mouseY,
|
||||||
|
@ -2565,7 +2565,7 @@ const mouseMove = function (evt) {
|
||||||
* @param {MouseEvent} evt
|
* @param {MouseEvent} evt
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:zoomed
|
* @fires module:svgcanvas.SvgCanvas#event:zoomed
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:changed
|
* @fires module:svgcanvas.SvgCanvas#event:changed
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-mouseUp
|
* @fires module:svgcanvas.SvgCanvas#event:ext_mouseUp
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const mouseUp = function (evt) {
|
const mouseUp = function (evt) {
|
||||||
|
@ -2802,13 +2802,13 @@ const mouseUp = function (evt) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main (left) mouse button is released (anywhere)
|
* The main (left) mouse button is released (anywhere)
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-mouseUp
|
* @event module:svgcanvas.SvgCanvas#event:ext_mouseUp
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {MouseEvent} event The event object
|
* @property {MouseEvent} event The event object
|
||||||
* @property {Float} mouse_x x coordinate on canvas
|
* @property {Float} mouse_x x coordinate on canvas
|
||||||
* @property {Float} mouse_y y coordinate on canvas
|
* @property {Float} mouse_y y coordinate on canvas
|
||||||
*/
|
*/
|
||||||
const extResult = runExtensions('mouseUp', /** @type {module:svgcanvas.SvgCanvas#event:ext-mouseUp} */ {
|
const extResult = runExtensions('mouseUp', /** @type {module:svgcanvas.SvgCanvas#event:ext_mouseUp} */ {
|
||||||
event: evt,
|
event: evt,
|
||||||
mouse_x: mouseX,
|
mouse_x: mouseX,
|
||||||
mouse_y: mouseY
|
mouse_y: mouseY
|
||||||
|
@ -5202,19 +5202,19 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The zoom level has changed. Supplies the new zoom level as a number (not percentage).
|
* The zoom level has changed. Supplies the new zoom level as a number (not percentage).
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-zoomChanged
|
* @event module:svgcanvas.SvgCanvas#event:ext_zoomChanged
|
||||||
* @type {Float}
|
* @type {Float}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The bottom panel was updated
|
* The bottom panel was updated
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-toolButtonStateUpdate
|
* @event module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {boolean} nofill Indicates fill is disabled
|
* @property {boolean} nofill Indicates fill is disabled
|
||||||
* @property {boolean} nostroke Indicates stroke is disabled
|
* @property {boolean} nostroke Indicates stroke is disabled
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The element selection has changed (elements were added/removed from selection)
|
* The element selection has changed (elements were added/removed from selection)
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-selectedChanged
|
* @event module:svgcanvas.SvgCanvas#event:ext_selectedChanged
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {Element[]} elems Array of the newly selected elements
|
* @property {Element[]} elems Array of the newly selected elements
|
||||||
* @property {Element|null} selectedElement The single selected element
|
* @property {Element|null} selectedElement The single selected element
|
||||||
|
@ -5223,19 +5223,19 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||||
/**
|
/**
|
||||||
* Called when part of element is in process of changing, generally on
|
* Called when part of element is in process of changing, generally on
|
||||||
* mousemove actions like rotate, move, etc.
|
* mousemove actions like rotate, move, etc.
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-elementTransition
|
* @event module:svgcanvas.SvgCanvas#event:ext_elementTransition
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {Element[]} elems Array of transitioning elements
|
* @property {Element[]} elems Array of transitioning elements
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* One or more elements were changed
|
* One or more elements were changed
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-elementChanged
|
* @event module:svgcanvas.SvgCanvas#event:ext_elementChanged
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {Element[]} elems Array of the affected elements
|
* @property {Element[]} elems Array of the affected elements
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Invoked as soon as the locale is ready
|
* Invoked as soon as the locale is ready
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-langReady
|
* @event module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {string} lang The two-letter language code
|
* @property {string} lang The two-letter language code
|
||||||
* @property {module:SVGEditor.uiStrings} uiStrings
|
* @property {module:SVGEditor.uiStrings} uiStrings
|
||||||
|
@ -5243,30 +5243,30 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* The language was changed. Two-letter code of the new language.
|
* The language was changed. Two-letter code of the new language.
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-langChanged
|
* @event module:svgcanvas.SvgCanvas#event:ext_langChanged
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Means for an extension to add locale data. The two-letter language code.
|
* Means for an extension to add locale data. The two-letter language code.
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-addLangData
|
* @event module:svgcanvas.SvgCanvas#event:ext_addLangData
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {string} lang
|
* @property {string} lang
|
||||||
* @property {module:SVGEditor~ImportLocale} importLocale
|
* @property {module:SVGEditor~ImportLocale} importLocale
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Called when new image is created
|
* Called when new image is created
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-onNewDocument
|
* @event module:svgcanvas.SvgCanvas#event:ext_onNewDocument
|
||||||
* @type {void}
|
* @type {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Called when sidepanel is resized or toggled
|
* Called when sidepanel is resized or toggled
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-workareaResized
|
* @event module:svgcanvas.SvgCanvas#event:ext_workareaResized
|
||||||
* @type {void}
|
* @type {void}
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Called upon addition of the extension, or, if svgicons are set,
|
* Called upon addition of the extension, or, if svgicons are set,
|
||||||
* after the icons are ready when extension SVG icons have loaded.
|
* after the icons are ready when extension SVG icons have loaded.
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-callback
|
* @event module:svgcanvas.SvgCanvas#event:ext_callback
|
||||||
* @type {void}
|
* @type {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -5274,7 +5274,7 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||||
* Sets the zoom to the given level.
|
* Sets the zoom to the given level.
|
||||||
* @function module:svgcanvas.SvgCanvas#setZoom
|
* @function module:svgcanvas.SvgCanvas#setZoom
|
||||||
* @param {Float} zoomLevel - Float indicating the zoom level to change to
|
* @param {Float} zoomLevel - Float indicating the zoom level to change to
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-zoomChanged
|
* @fires module:svgcanvas.SvgCanvas#event:ext_zoomChanged
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
this.setZoom = function (zoomLevel) {
|
this.setZoom = function (zoomLevel) {
|
||||||
|
@ -5286,7 +5286,7 @@ this.setZoom = function (zoomLevel) {
|
||||||
selectorManager.requestSelector(elem).resize();
|
selectorManager.requestSelector(elem).resize();
|
||||||
});
|
});
|
||||||
pathActions.zoomChange();
|
pathActions.zoomChange();
|
||||||
runExtensions('zoomChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext-zoomChanged} */ zoomLevel);
|
runExtensions('zoomChanged', /** @type {module:svgcanvas.SvgCanvas#event:ext_zoomChanged} */ zoomLevel);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6368,7 +6368,7 @@ this.copySelectedElements = function () {
|
||||||
* @param {Integer|void} x Expected if type is "point"
|
* @param {Integer|void} x Expected if type is "point"
|
||||||
* @param {Integer|void} y Expected if type is "point"
|
* @param {Integer|void} y Expected if type is "point"
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:changed
|
* @fires module:svgcanvas.SvgCanvas#event:changed
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-IDsUpdated
|
* @fires module:svgcanvas.SvgCanvas#event:ext_IDsUpdated
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
this.pasteElements = function (type, x, y) {
|
this.pasteElements = function (type, x, y) {
|
||||||
|
@ -6405,14 +6405,14 @@ this.pasteElements = function (type, x, y) {
|
||||||
// Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
// Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||||
/**
|
/**
|
||||||
* Triggered when `pasteElements` is called from a paste action (context menu or key)
|
* Triggered when `pasteElements` is called from a paste action (context menu or key)
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-IDsUpdated
|
* @event module:svgcanvas.SvgCanvas#event:ext_IDsUpdated
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {module:svgcanvas.SVGAsJSON[]} elems
|
* @property {module:svgcanvas.SVGAsJSON[]} elems
|
||||||
* @property {module:svgcanvas.ChangedIDs} changes Maps past ID (on attribute) to current ID
|
* @property {module:svgcanvas.ChangedIDs} changes Maps past ID (on attribute) to current ID
|
||||||
*/
|
*/
|
||||||
runExtensions(
|
runExtensions(
|
||||||
'IDsUpdated',
|
'IDsUpdated',
|
||||||
/** @type {module:svgcanvas.SvgCanvas#event:ext-IDsUpdated} */
|
/** @type {module:svgcanvas.SvgCanvas#event:ext_IDsUpdated} */
|
||||||
{elems: clipb, changes: changedIDs},
|
{elems: clipb, changes: changedIDs},
|
||||||
true
|
true
|
||||||
).forEach(function (extChanges) {
|
).forEach(function (extChanges) {
|
||||||
|
@ -7130,7 +7130,7 @@ this.contentH = getResolution().h;
|
||||||
* @function module:svgcanvas.SvgCanvas#updateCanvas
|
* @function module:svgcanvas.SvgCanvas#updateCanvas
|
||||||
* @param {Float} w - Float with the new width
|
* @param {Float} w - Float with the new width
|
||||||
* @param {Float} h - Float with the new height
|
* @param {Float} h - Float with the new height
|
||||||
* @fires module:svgcanvas.SvgCanvas#event:ext-canvasUpdated
|
* @fires module:svgcanvas.SvgCanvas#event:ext_canvasUpdated
|
||||||
* @returns {module:svgcanvas.CanvasInfo}
|
* @returns {module:svgcanvas.CanvasInfo}
|
||||||
*/
|
*/
|
||||||
this.updateCanvas = function (w, h) {
|
this.updateCanvas = function (w, h) {
|
||||||
|
@ -7169,7 +7169,7 @@ this.updateCanvas = function (w, h) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked upon updates to the canvas.
|
* Invoked upon updates to the canvas.
|
||||||
* @event module:svgcanvas.SvgCanvas#event:ext-canvasUpdated
|
* @event module:svgcanvas.SvgCanvas#event:ext_canvasUpdated
|
||||||
* @type {PlainObject}
|
* @type {PlainObject}
|
||||||
* @property {Integer} new_x
|
* @property {Integer} new_x
|
||||||
* @property {Integer} new_y
|
* @property {Integer} new_y
|
||||||
|
@ -7181,7 +7181,7 @@ this.updateCanvas = function (w, h) {
|
||||||
runExtensions(
|
runExtensions(
|
||||||
'canvasUpdated',
|
'canvasUpdated',
|
||||||
/**
|
/**
|
||||||
* @type {module:svgcanvas.SvgCanvas#event:ext-canvasUpdated}
|
* @type {module:svgcanvas.SvgCanvas#event:ext_canvasUpdated}
|
||||||
*/
|
*/
|
||||||
{new_x: x, new_y: y, old_x: oldX, old_y: oldY, d_x: x - oldX, d_y: y - oldY}
|
{new_x: x, new_y: y, old_x: oldX, old_y: oldY, d_x: x - oldX, d_y: y - oldY}
|
||||||
);
|
);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4358,9 +4358,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"eslint-plugin-import": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.2.tgz",
|
||||||
"integrity": "sha512-lzD9uvRvW4MsHzIOMJEDSb5MOV9LzgxRPBaovvOhJqzgxRHYfGy9QOrMuwHIh5ehKFJ7Z3DcrcGKDQ0IbP0EdQ==",
|
"integrity": "sha512-m+cSVxM7oLsIpmwNn2WXTJoReOF9f/CtLMo7qOVmKd1KntBy0hEcuNZ3erTmWjx+DxRO0Zcrm5KwAvI9wHcV5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"array-includes": "^3.0.3",
|
"array-includes": "^3.0.3",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue