- Linting (ESLint): As per latest ash-nazg (jsdoc for classes/methods)
- npm: Update devDeps
This commit is contained in:
113
dist/extensions/imagelib/openclipart.js
vendored
113
dist/extensions/imagelib/openclipart.js
vendored
@@ -582,7 +582,7 @@
|
||||
var doc = typeof document !== 'undefined' && document || win && win.document; // STATIC PROPERTIES
|
||||
|
||||
var possibleOptions = ['$plugins', // '$mode', // Todo (SVG/XML)
|
||||
// 'state', // Used internally
|
||||
// '$state', // Used internally
|
||||
'$map' // Add any other options here
|
||||
];
|
||||
var NS_HTML = 'http://www.w3.org/1999/xhtml',
|
||||
@@ -661,9 +661,7 @@
|
||||
|
||||
|
||||
function _appendNode(parent, child) {
|
||||
var parentName = _getHTMLNodeName(parent);
|
||||
|
||||
var childName = _getHTMLNodeName(child); // IE only
|
||||
var parentName = _getHTMLNodeName(parent); // IE only
|
||||
// istanbul ignore if
|
||||
|
||||
|
||||
@@ -689,6 +687,9 @@
|
||||
parent.append(child); // IE9 is now ok with this
|
||||
} catch (e) {
|
||||
// istanbul ignore next
|
||||
var childName = _getHTMLNodeName(child); // istanbul ignore next
|
||||
|
||||
|
||||
if (parentName === 'select' && childName === 'option') {
|
||||
try {
|
||||
// Since this is now DOM Level 4 standard behavior (and what IE7+ can handle), we try it first
|
||||
@@ -844,20 +845,6 @@
|
||||
return retStr;
|
||||
};
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @returns {Element}
|
||||
*/
|
||||
|
||||
|
||||
function _optsOrUndefinedJML() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return jml.apply(void 0, _toConsumableArray$1(args[0] === undefined ? args.slice(1) : args));
|
||||
}
|
||||
/**
|
||||
* @typedef {JamilihAttributes} AttributeArray
|
||||
* @property {string} 0 The key
|
||||
@@ -883,7 +870,7 @@
|
||||
return function (childNodeJML, i) {
|
||||
var cn = node.childNodes[i];
|
||||
var j = Array.isArray(childNodeJML) ? jml.apply(void 0, _toConsumableArray$1(childNodeJML)) : jml(childNodeJML);
|
||||
cn.parentNode.replaceChild(j, cn);
|
||||
cn.replaceWith(j);
|
||||
};
|
||||
}
|
||||
/**
|
||||
@@ -902,7 +889,11 @@
|
||||
|
||||
function _appendJML(node) {
|
||||
return function (childJML) {
|
||||
node.append(jml.apply(void 0, _toConsumableArray$1(childJML)));
|
||||
if (Array.isArray(childJML)) {
|
||||
node.append(jml.apply(void 0, _toConsumableArray$1(childJML)));
|
||||
} else {
|
||||
node.append(jml(childJML));
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
@@ -923,8 +914,10 @@
|
||||
return function (childJML) {
|
||||
if (typeof childJML === 'string') {
|
||||
node.append(childJML);
|
||||
} else {
|
||||
} else if (Array.isArray(childJML)) {
|
||||
node.append(jml.apply(void 0, _toConsumableArray$1(childJML)));
|
||||
} else {
|
||||
node.append(jml(childJML));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -970,15 +963,15 @@
|
||||
* Creates an XHTML or HTML element (XHTML is preferred, but only in browsers
|
||||
* that support); any element after element can be omitted, and any subsequent
|
||||
* type or types added afterwards.
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {JamilihReturn} The newly created (and possibly already appended)
|
||||
* element or array of elements
|
||||
*/
|
||||
|
||||
|
||||
var jml = function jml() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var elem = doc.createDocumentFragment();
|
||||
@@ -1021,7 +1014,8 @@
|
||||
case '#':
|
||||
{
|
||||
// Document fragment
|
||||
nodes[nodes.length] = _optsOrUndefinedJML(opts, attVal);
|
||||
opts.$state = 'fragmentChilden';
|
||||
nodes[nodes.length] = jml(opts, attVal);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1068,6 +1062,12 @@
|
||||
break;
|
||||
}
|
||||
|
||||
case '$state':
|
||||
{
|
||||
// Handled internally
|
||||
break;
|
||||
}
|
||||
|
||||
case 'is':
|
||||
{
|
||||
// Currently only in Chrome
|
||||
@@ -1100,6 +1100,7 @@
|
||||
throw new TypeError('Expected `is` with `$define` on built-in');
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute('is', atts.is);
|
||||
is = atts.is;
|
||||
}
|
||||
@@ -1412,6 +1413,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute(att, attVal);
|
||||
break;
|
||||
|
||||
@@ -1453,6 +1455,7 @@
|
||||
} // setAttribute unfortunately erases any existing styles
|
||||
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute(att, attVal);
|
||||
/*
|
||||
// The following reorders which is troublesome for serialization, e.g., as used in our testing
|
||||
@@ -1466,12 +1469,13 @@
|
||||
break;
|
||||
}
|
||||
|
||||
var matchingPlugin = opts && opts.$plugins && opts.$plugins.find(function (p) {
|
||||
var matchingPlugin = opts.$plugins && opts.$plugins.find(function (p) {
|
||||
return p.name === att;
|
||||
});
|
||||
|
||||
if (matchingPlugin) {
|
||||
matchingPlugin.set({
|
||||
opts: opts,
|
||||
element: elem,
|
||||
attribute: {
|
||||
name: att,
|
||||
@@ -1481,6 +1485,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute(att, attVal);
|
||||
break;
|
||||
}
|
||||
@@ -1504,9 +1509,9 @@
|
||||
})) {
|
||||
opts = args[0];
|
||||
|
||||
if (opts.state !== 'child') {
|
||||
if (opts.$state === undefined) {
|
||||
isRoot = true;
|
||||
opts.state = 'child';
|
||||
opts.$state = 'root';
|
||||
}
|
||||
|
||||
if (opts.$map && !opts.$map.root && opts.$map.root !== false) {
|
||||
@@ -1536,10 +1541,14 @@
|
||||
}
|
||||
|
||||
args = args.slice(1);
|
||||
} else {
|
||||
opts = {
|
||||
$state: undefined
|
||||
};
|
||||
}
|
||||
|
||||
var argc = args.length;
|
||||
var defaultMap = opts && opts.$map && opts.$map.root;
|
||||
var defaultMap = opts.$map && opts.$map.root;
|
||||
|
||||
var setMap = function setMap(dataVal) {
|
||||
var map, obj; // Boolean indicating use of default map and object
|
||||
@@ -1665,6 +1674,7 @@
|
||||
|
||||
case '':
|
||||
nodes[nodes.length] = elem = doc.createDocumentFragment();
|
||||
opts.$state = 'fragment';
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1693,6 +1703,7 @@
|
||||
elem = doc.createElement(elStr);
|
||||
}
|
||||
|
||||
opts.$state = 'element';
|
||||
nodes[nodes.length] = elem; // Add to parent
|
||||
|
||||
break;
|
||||
@@ -1722,7 +1733,8 @@
|
||||
|
||||
|
||||
elem = nodes[nodes.length - 1] = new win.DOMParser().parseFromString(new win.XMLSerializer().serializeToString(elem) // Mozilla adds XHTML namespace
|
||||
.replace(' xmlns="' + NS_HTML + '"', replacer), 'application/xml').documentElement; // }catch(e) {alert(elem.outerHTML);throw e;}
|
||||
.replace(' xmlns="' + NS_HTML + '"', replacer), 'application/xml').documentElement;
|
||||
opts.$state = 'element'; // }catch(e) {alert(elem.outerHTML);throw e;}
|
||||
}
|
||||
|
||||
_checkAtts(_atts);
|
||||
@@ -1740,6 +1752,7 @@
|
||||
if (i === 0) {
|
||||
// Allow wrapping of element, fragment, or document
|
||||
elem = arg;
|
||||
opts.$state = 'element';
|
||||
}
|
||||
|
||||
if (i === argc - 1 || i === argc - 2 && args[i + 1] === null) {
|
||||
@@ -1787,10 +1800,14 @@
|
||||
default:
|
||||
if (Array.isArray(childContent)) {
|
||||
// Arrays representing child elements
|
||||
_appendNode(elem, _optsOrUndefinedJML.apply(void 0, [opts].concat(_toConsumableArray$1(childContent))));
|
||||
opts.$state = 'children';
|
||||
|
||||
_appendNode(elem, jml.apply(void 0, [opts].concat(_toConsumableArray$1(childContent))));
|
||||
} else if (childContent['#']) {
|
||||
// Fragment
|
||||
_appendNode(elem, _optsOrUndefinedJML(opts, childContent['#']));
|
||||
opts.$state = 'fragmentChildren';
|
||||
|
||||
_appendNode(elem, jml(opts, childContent['#']));
|
||||
} else {
|
||||
// Single DOM element children
|
||||
_appendNode(elem, childContent);
|
||||
@@ -1807,7 +1824,7 @@
|
||||
|
||||
var ret = nodes[0] || elem;
|
||||
|
||||
if (opts && isRoot && opts.$map && opts.$map.root) {
|
||||
if (isRoot && opts.$map && opts.$map.root) {
|
||||
setMap(true);
|
||||
}
|
||||
|
||||
@@ -2193,7 +2210,7 @@
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {JamilihReturn}
|
||||
*/
|
||||
|
||||
@@ -2204,7 +2221,7 @@
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -2219,7 +2236,7 @@
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -2230,7 +2247,7 @@
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -2241,7 +2258,7 @@
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -2281,8 +2298,8 @@
|
||||
|
||||
elem = typeof elem === 'string' ? $(elem) : elem;
|
||||
|
||||
for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
||||
args[_key3 - 2] = arguments[_key3];
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
return (_this$get = this.get(elem))[methodName].apply(_this$get, [elem].concat(args));
|
||||
@@ -2322,8 +2339,8 @@
|
||||
|
||||
elem = typeof elem === 'string' ? $(elem) : elem;
|
||||
|
||||
for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
|
||||
args[_key4 - 2] = arguments[_key4];
|
||||
for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
||||
args[_key3 - 2] = arguments[_key3];
|
||||
}
|
||||
|
||||
return (_this$get2 = this.get(elem))[methodName].apply(_this$get2, [elem].concat(args));
|
||||
@@ -2350,8 +2367,8 @@
|
||||
jml.weak = function (obj) {
|
||||
var map = new JamilihWeakMap();
|
||||
|
||||
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
|
||||
args[_key5 - 1] = arguments[_key5];
|
||||
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
||||
args[_key4 - 1] = arguments[_key4];
|
||||
}
|
||||
|
||||
var elem = jml.apply(void 0, [{
|
||||
@@ -2369,8 +2386,8 @@
|
||||
jml.strong = function (obj) {
|
||||
var map = new JamilihMap();
|
||||
|
||||
for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
|
||||
args[_key6 - 1] = arguments[_key6];
|
||||
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
|
||||
args[_key5 - 1] = arguments[_key5];
|
||||
}
|
||||
|
||||
var elem = jml.apply(void 0, [{
|
||||
@@ -2405,8 +2422,8 @@
|
||||
elem = typeof elem === 'string' ? $(elem) : elem;
|
||||
var func;
|
||||
|
||||
for (var _len7 = arguments.length, args = new Array(_len7 > 3 ? _len7 - 3 : 0), _key7 = 3; _key7 < _len7; _key7++) {
|
||||
args[_key7 - 3] = arguments[_key7];
|
||||
for (var _len6 = arguments.length, args = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
|
||||
args[_key6 - 3] = arguments[_key6];
|
||||
}
|
||||
|
||||
if (['symbol', 'string'].includes(_typeof$1(symOrMap))) {
|
||||
|
||||
102
dist/index-es.js
vendored
102
dist/index-es.js
vendored
@@ -324,7 +324,7 @@ var getReverseNS = function getReverseNS() {
|
||||
* Chrome 46.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-shadow, class-methods-use-this */
|
||||
/* eslint-disable no-shadow, class-methods-use-this, jsdoc/require-jsdoc */
|
||||
// Linting: We avoid `no-shadow` as ESLint thinks these are still available globals
|
||||
// Linting: We avoid `class-methods-use-this` as this is a polyfill that must
|
||||
// follow the conventions
|
||||
@@ -3862,10 +3862,6 @@ function () {
|
||||
/**
|
||||
* History command for an element that had its DOM position changed.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
|
||||
@@ -3874,6 +3870,12 @@ var MoveElementCommand =
|
||||
function (_Command) {
|
||||
_inherits(MoveElementCommand, _Command);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function MoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this;
|
||||
|
||||
@@ -3888,6 +3890,10 @@ function (_Command) {
|
||||
_this.newParent = elem.parentNode;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(MoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -3953,9 +3959,6 @@ MoveElementCommand.type = MoveElementCommand.prototype.type;
|
||||
/**
|
||||
* History command for an element that was added to the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var InsertElementCommand =
|
||||
@@ -3963,6 +3966,10 @@ var InsertElementCommand =
|
||||
function (_Command2) {
|
||||
_inherits(InsertElementCommand, _Command2);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function InsertElementCommand(elem, text) {
|
||||
var _this2;
|
||||
|
||||
@@ -3975,6 +3982,10 @@ function (_Command2) {
|
||||
_this2.nextSibling = _this2.elem.nextSibling;
|
||||
return _this2;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(InsertElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4040,10 +4051,6 @@ InsertElementCommand.type = InsertElementCommand.prototype.type;
|
||||
/**
|
||||
* History command for an element removed from the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var RemoveElementCommand =
|
||||
@@ -4051,6 +4058,12 @@ var RemoveElementCommand =
|
||||
function (_Command3) {
|
||||
_inherits(RemoveElementCommand, _Command3);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function RemoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this3;
|
||||
|
||||
@@ -4065,6 +4078,10 @@ function (_Command3) {
|
||||
removeElementFromListMap(elem);
|
||||
return _this3;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(RemoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4148,9 +4165,6 @@ RemoveElementCommand.type = RemoveElementCommand.prototype.type;
|
||||
* History command to make a change to an element.
|
||||
* Usually an attribute change, but can also be textcontent.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var ChangeElementCommand =
|
||||
@@ -4158,6 +4172,11 @@ var ChangeElementCommand =
|
||||
function (_Command4) {
|
||||
_inherits(ChangeElementCommand, _Command4);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function ChangeElementCommand(elem, attrs, text) {
|
||||
var _this4;
|
||||
|
||||
@@ -4181,6 +4200,10 @@ function (_Command4) {
|
||||
|
||||
return _this4;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ChangeElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4357,6 +4380,10 @@ function (_Command5) {
|
||||
_this7.stack = [];
|
||||
return _this7;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(BatchCommand, [{
|
||||
key: "type",
|
||||
@@ -13360,6 +13387,9 @@ function () {
|
||||
var SelectorManager =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
function SelectorManager() {
|
||||
_classCallCheck(this, SelectorManager);
|
||||
|
||||
@@ -24762,13 +24792,15 @@ var jPicker = function jPicker($) {
|
||||
* Encapsulate slider functionality for the ColorMap and ColorBar -
|
||||
* could be useful to use a jQuery UI draggable for this with certain extensions.
|
||||
* @memberof module:jPicker
|
||||
* @param {external:jQuery} bar
|
||||
* @param {module:jPicker.SliderOptions} options
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
var Slider = function Slider(bar, options) {
|
||||
var Slider =
|
||||
/**
|
||||
* @param {external:jQuery} bar
|
||||
* @param {module:jPicker.SliderOptions} options
|
||||
*/
|
||||
function Slider(bar, options) {
|
||||
_classCallCheck(this, Slider);
|
||||
|
||||
var that = this;
|
||||
@@ -25174,14 +25206,17 @@ var jPicker = function jPicker($) {
|
||||
};
|
||||
/**
|
||||
* Controls for all the input elements for the typing in color values.
|
||||
*/
|
||||
|
||||
|
||||
var ColorValuePicker =
|
||||
/**
|
||||
* @param {external:jQuery} picker
|
||||
* @param {external:jQuery.jPicker.Color} color
|
||||
* @param {external:jQuery.fn.$.fn.jPicker} bindedHex
|
||||
* @param {Float} alphaPrecision
|
||||
*/
|
||||
|
||||
|
||||
var ColorValuePicker = function ColorValuePicker(picker, color, bindedHex, alphaPrecision) {
|
||||
function ColorValuePicker(picker, color, bindedHex, alphaPrecision) {
|
||||
_classCallCheck(this, ColorValuePicker);
|
||||
|
||||
var that = this; // private properties and methods
|
||||
@@ -34417,10 +34452,18 @@ editor.init = function () {
|
||||
$$b('#color_picker').hide();
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Paint box class.
|
||||
*/
|
||||
|
||||
|
||||
var PaintBox =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* @param {string|Element|external:jQuery} container
|
||||
* @param {"fill"} type
|
||||
*/
|
||||
function PaintBox(container, type) {
|
||||
_classCallCheck(this, PaintBox);
|
||||
|
||||
@@ -34438,6 +34481,12 @@ editor.init = function () {
|
||||
});
|
||||
this.type = type;
|
||||
}
|
||||
/**
|
||||
* @param {module:jGraduate~Paint} paint
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(PaintBox, [{
|
||||
key: "setPaint",
|
||||
@@ -34471,6 +34520,11 @@ editor.init = function () {
|
||||
svgCanvas.setPaintOpacity(this.type, this._paintOpacity, true);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "update",
|
||||
value: function update(apply) {
|
||||
@@ -34540,6 +34594,10 @@ editor.init = function () {
|
||||
|
||||
this.setPaint(paint);
|
||||
}
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "prep",
|
||||
value: function prep() {
|
||||
|
||||
2
dist/index-es.min.js.map
vendored
2
dist/index-es.min.js.map
vendored
File diff suppressed because one or more lines are too long
102
dist/index-umd.js
vendored
102
dist/index-umd.js
vendored
@@ -330,7 +330,7 @@
|
||||
* Chrome 46.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-shadow, class-methods-use-this */
|
||||
/* eslint-disable no-shadow, class-methods-use-this, jsdoc/require-jsdoc */
|
||||
// Linting: We avoid `no-shadow` as ESLint thinks these are still available globals
|
||||
// Linting: We avoid `class-methods-use-this` as this is a polyfill that must
|
||||
// follow the conventions
|
||||
@@ -3868,10 +3868,6 @@
|
||||
/**
|
||||
* History command for an element that had its DOM position changed.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
|
||||
@@ -3880,6 +3876,12 @@
|
||||
function (_Command) {
|
||||
_inherits(MoveElementCommand, _Command);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function MoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this;
|
||||
|
||||
@@ -3894,6 +3896,10 @@
|
||||
_this.newParent = elem.parentNode;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(MoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -3959,9 +3965,6 @@
|
||||
/**
|
||||
* History command for an element that was added to the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var InsertElementCommand =
|
||||
@@ -3969,6 +3972,10 @@
|
||||
function (_Command2) {
|
||||
_inherits(InsertElementCommand, _Command2);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function InsertElementCommand(elem, text) {
|
||||
var _this2;
|
||||
|
||||
@@ -3981,6 +3988,10 @@
|
||||
_this2.nextSibling = _this2.elem.nextSibling;
|
||||
return _this2;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(InsertElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4046,10 +4057,6 @@
|
||||
/**
|
||||
* History command for an element removed from the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var RemoveElementCommand =
|
||||
@@ -4057,6 +4064,12 @@
|
||||
function (_Command3) {
|
||||
_inherits(RemoveElementCommand, _Command3);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function RemoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this3;
|
||||
|
||||
@@ -4071,6 +4084,10 @@
|
||||
removeElementFromListMap(elem);
|
||||
return _this3;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(RemoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4154,9 +4171,6 @@
|
||||
* History command to make a change to an element.
|
||||
* Usually an attribute change, but can also be textcontent.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var ChangeElementCommand =
|
||||
@@ -4164,6 +4178,11 @@
|
||||
function (_Command4) {
|
||||
_inherits(ChangeElementCommand, _Command4);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function ChangeElementCommand(elem, attrs, text) {
|
||||
var _this4;
|
||||
|
||||
@@ -4187,6 +4206,10 @@
|
||||
|
||||
return _this4;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ChangeElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4363,6 +4386,10 @@
|
||||
_this7.stack = [];
|
||||
return _this7;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(BatchCommand, [{
|
||||
key: "type",
|
||||
@@ -13366,6 +13393,9 @@
|
||||
var SelectorManager =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
function SelectorManager() {
|
||||
_classCallCheck(this, SelectorManager);
|
||||
|
||||
@@ -24768,13 +24798,15 @@
|
||||
* Encapsulate slider functionality for the ColorMap and ColorBar -
|
||||
* could be useful to use a jQuery UI draggable for this with certain extensions.
|
||||
* @memberof module:jPicker
|
||||
* @param {external:jQuery} bar
|
||||
* @param {module:jPicker.SliderOptions} options
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
var Slider = function Slider(bar, options) {
|
||||
var Slider =
|
||||
/**
|
||||
* @param {external:jQuery} bar
|
||||
* @param {module:jPicker.SliderOptions} options
|
||||
*/
|
||||
function Slider(bar, options) {
|
||||
_classCallCheck(this, Slider);
|
||||
|
||||
var that = this;
|
||||
@@ -25180,14 +25212,17 @@
|
||||
};
|
||||
/**
|
||||
* Controls for all the input elements for the typing in color values.
|
||||
*/
|
||||
|
||||
|
||||
var ColorValuePicker =
|
||||
/**
|
||||
* @param {external:jQuery} picker
|
||||
* @param {external:jQuery.jPicker.Color} color
|
||||
* @param {external:jQuery.fn.$.fn.jPicker} bindedHex
|
||||
* @param {Float} alphaPrecision
|
||||
*/
|
||||
|
||||
|
||||
var ColorValuePicker = function ColorValuePicker(picker, color, bindedHex, alphaPrecision) {
|
||||
function ColorValuePicker(picker, color, bindedHex, alphaPrecision) {
|
||||
_classCallCheck(this, ColorValuePicker);
|
||||
|
||||
var that = this; // private properties and methods
|
||||
@@ -34423,10 +34458,18 @@
|
||||
$$b('#color_picker').hide();
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Paint box class.
|
||||
*/
|
||||
|
||||
|
||||
var PaintBox =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* @param {string|Element|external:jQuery} container
|
||||
* @param {"fill"} type
|
||||
*/
|
||||
function PaintBox(container, type) {
|
||||
_classCallCheck(this, PaintBox);
|
||||
|
||||
@@ -34444,6 +34487,12 @@
|
||||
});
|
||||
this.type = type;
|
||||
}
|
||||
/**
|
||||
* @param {module:jGraduate~Paint} paint
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(PaintBox, [{
|
||||
key: "setPaint",
|
||||
@@ -34477,6 +34526,11 @@
|
||||
svgCanvas.setPaintOpacity(this.type, this._paintOpacity, true);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "update",
|
||||
value: function update(apply) {
|
||||
@@ -34546,6 +34600,10 @@
|
||||
|
||||
this.setPaint(paint);
|
||||
}
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "prep",
|
||||
value: function prep() {
|
||||
|
||||
2
dist/index-umd.min.js.map
vendored
2
dist/index-umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/redirect-on-lacking-support.js
vendored
2
dist/redirect-on-lacking-support.js
vendored
@@ -104,7 +104,7 @@
|
||||
* Chrome 46.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-shadow, class-methods-use-this */
|
||||
/* eslint-disable no-shadow, class-methods-use-this, jsdoc/require-jsdoc */
|
||||
// Linting: We avoid `no-shadow` as ESLint thinks these are still available globals
|
||||
// Linting: We avoid `class-methods-use-this` as this is a polyfill that must
|
||||
// follow the conventions
|
||||
|
||||
60
dist/svgcanvas-iife.js
vendored
60
dist/svgcanvas-iife.js
vendored
@@ -202,7 +202,7 @@ var SvgCanvas = (function () {
|
||||
* Chrome 46.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-shadow, class-methods-use-this */
|
||||
/* eslint-disable no-shadow, class-methods-use-this, jsdoc/require-jsdoc */
|
||||
// Linting: We avoid `no-shadow` as ESLint thinks these are still available globals
|
||||
// Linting: We avoid `class-methods-use-this` as this is a polyfill that must
|
||||
// follow the conventions
|
||||
@@ -3934,10 +3934,6 @@ var SvgCanvas = (function () {
|
||||
/**
|
||||
* History command for an element that had its DOM position changed.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
|
||||
@@ -3946,6 +3942,12 @@ var SvgCanvas = (function () {
|
||||
function (_Command) {
|
||||
_inherits(MoveElementCommand, _Command);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was moved
|
||||
* @param {Element} oldNextSibling - The element's next sibling before it was moved
|
||||
* @param {Element} oldParent - The element's parent before it was moved
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function MoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this;
|
||||
|
||||
@@ -3960,6 +3962,10 @@ var SvgCanvas = (function () {
|
||||
_this.newParent = elem.parentNode;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(MoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4025,9 +4031,6 @@ var SvgCanvas = (function () {
|
||||
/**
|
||||
* History command for an element that was added to the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var InsertElementCommand =
|
||||
@@ -4035,6 +4038,10 @@ var SvgCanvas = (function () {
|
||||
function (_Command2) {
|
||||
_inherits(InsertElementCommand, _Command2);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function InsertElementCommand(elem, text) {
|
||||
var _this2;
|
||||
|
||||
@@ -4047,6 +4054,10 @@ var SvgCanvas = (function () {
|
||||
_this2.nextSibling = _this2.elem.nextSibling;
|
||||
return _this2;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(InsertElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4112,10 +4123,6 @@ var SvgCanvas = (function () {
|
||||
/**
|
||||
* History command for an element removed from the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var RemoveElementCommand =
|
||||
@@ -4123,6 +4130,12 @@ var SvgCanvas = (function () {
|
||||
function (_Command3) {
|
||||
_inherits(RemoveElementCommand, _Command3);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The removed DOM element
|
||||
* @param {Node} oldNextSibling - The DOM element's nextSibling when it was in the DOM
|
||||
* @param {Element} oldParent - The DOM element's parent
|
||||
* @param {string} [text] - An optional string visible to user related to this change
|
||||
*/
|
||||
function RemoveElementCommand(elem, oldNextSibling, oldParent, text) {
|
||||
var _this3;
|
||||
|
||||
@@ -4137,6 +4150,10 @@ var SvgCanvas = (function () {
|
||||
removeElementFromListMap(elem);
|
||||
return _this3;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(RemoveElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4220,9 +4237,6 @@ var SvgCanvas = (function () {
|
||||
* History command to make a change to an element.
|
||||
* Usually an attribute change, but can also be textcontent.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
|
||||
var ChangeElementCommand =
|
||||
@@ -4230,6 +4244,11 @@ var SvgCanvas = (function () {
|
||||
function (_Command4) {
|
||||
_inherits(ChangeElementCommand, _Command4);
|
||||
|
||||
/**
|
||||
* @param {Element} elem - The DOM element that was changed
|
||||
* @param {module:history.CommandAttributes} attrs - Attributes to be changed with the values they had *before* the change
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
function ChangeElementCommand(elem, attrs, text) {
|
||||
var _this4;
|
||||
|
||||
@@ -4253,6 +4272,10 @@ var SvgCanvas = (function () {
|
||||
|
||||
return _this4;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ChangeElementCommand, [{
|
||||
key: "type",
|
||||
@@ -4429,6 +4452,10 @@ var SvgCanvas = (function () {
|
||||
_this7.stack = [];
|
||||
return _this7;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(BatchCommand, [{
|
||||
key: "type",
|
||||
@@ -13050,6 +13077,9 @@ var SvgCanvas = (function () {
|
||||
var SelectorManager =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
function SelectorManager() {
|
||||
_classCallCheck(this, SelectorManager);
|
||||
|
||||
|
||||
2
dist/svgcanvas-iife.min.js.map
vendored
2
dist/svgcanvas-iife.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user