- Linting (ESLint): As per latest ash-nazg (jsdoc for classes/methods)
- npm: Update devDepsmaster
parent
cf80e31de7
commit
f9f359b98f
|
@ -239,6 +239,7 @@ module.exports = {
|
|||
]
|
||||
},
|
||||
rules: {
|
||||
'jsdoc/require-jsdoc': 0,
|
||||
'no-console': 0,
|
||||
'import/unambiguous': 0,
|
||||
}
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
const EventEmitter = require('events');
|
||||
const BadgeGenerator = require('mocha-badge-generator');
|
||||
|
||||
/**
|
||||
* Mock the badge generator runner.
|
||||
*/
|
||||
class MockRunner extends EventEmitter {}
|
||||
|
||||
const {stats: {passes, failures}} = require('../mochawesome.json');
|
||||
|
|
|
@ -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) {
|
||||
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))) {
|
||||
|
|
|
@ -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() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable new-cap, class-methods-use-this */
|
||||
/* eslint-disable new-cap, class-methods-use-this, jsdoc/require-jsdoc */
|
||||
// Todo: Compare with latest canvg (add any improvements of ours) and add full JSDocs (denoting links to standard APIs and which are custom): https://github.com/canvg/canvg
|
||||
/**
|
||||
* Javascript SVG parser and renderer on Canvas.
|
||||
|
|
|
@ -325,7 +325,7 @@ var win = typeof window !== 'undefined' && window; // istanbul ignore next
|
|||
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',
|
||||
|
@ -408,9 +408,7 @@ function _applyAnyStylesheet(node) {
|
|||
|
||||
|
||||
function _appendNode(parent, child) {
|
||||
var parentName = _getHTMLNodeName(parent);
|
||||
|
||||
var childName = _getHTMLNodeName(child); // IE only
|
||||
var parentName = _getHTMLNodeName(parent); // IE only
|
||||
// istanbul ignore if
|
||||
|
||||
|
||||
|
@ -436,6 +434,9 @@ function _appendNode(parent, child) {
|
|||
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
|
||||
|
@ -591,20 +592,6 @@ function _replaceDefiner(xmlnsObj) {
|
|||
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(args[0] === undefined ? args.slice(1) : args));
|
||||
}
|
||||
/**
|
||||
* @typedef {JamilihAttributes} AttributeArray
|
||||
* @property {string} 0 The key
|
||||
|
@ -630,7 +617,7 @@ function _childrenToJML(node) {
|
|||
return function (childNodeJML, i) {
|
||||
var cn = node.childNodes[i];
|
||||
var j = Array.isArray(childNodeJML) ? jml.apply(void 0, _toConsumableArray(childNodeJML)) : jml(childNodeJML);
|
||||
cn.parentNode.replaceChild(j, cn);
|
||||
cn.replaceWith(j);
|
||||
};
|
||||
}
|
||||
/**
|
||||
|
@ -649,7 +636,11 @@ function _childrenToJML(node) {
|
|||
|
||||
function _appendJML(node) {
|
||||
return function (childJML) {
|
||||
if (Array.isArray(childJML)) {
|
||||
node.append(jml.apply(void 0, _toConsumableArray(childJML)));
|
||||
} else {
|
||||
node.append(jml(childJML));
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
|
@ -670,8 +661,10 @@ function _appendJMLOrText(node) {
|
|||
return function (childJML) {
|
||||
if (typeof childJML === 'string') {
|
||||
node.append(childJML);
|
||||
} else {
|
||||
} else if (Array.isArray(childJML)) {
|
||||
node.append(jml.apply(void 0, _toConsumableArray(childJML)));
|
||||
} else {
|
||||
node.append(jml(childJML));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -717,15 +710,15 @@ function _DOMfromJMLOrString (childNodeJML) {
|
|||
* 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();
|
||||
|
@ -768,7 +761,8 @@ var jml = function jml() {
|
|||
case '#':
|
||||
{
|
||||
// Document fragment
|
||||
nodes[nodes.length] = _optsOrUndefinedJML(opts, attVal);
|
||||
opts.$state = 'fragmentChilden';
|
||||
nodes[nodes.length] = jml(opts, attVal);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -815,6 +809,12 @@ var jml = function jml() {
|
|||
break;
|
||||
}
|
||||
|
||||
case '$state':
|
||||
{
|
||||
// Handled internally
|
||||
break;
|
||||
}
|
||||
|
||||
case 'is':
|
||||
{
|
||||
// Currently only in Chrome
|
||||
|
@ -847,6 +847,7 @@ var jml = function jml() {
|
|||
throw new TypeError('Expected `is` with `$define` on built-in');
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute('is', atts.is);
|
||||
is = atts.is;
|
||||
}
|
||||
|
@ -1159,6 +1160,7 @@ var jml = function jml() {
|
|||
break;
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute(att, attVal);
|
||||
break;
|
||||
|
||||
|
@ -1200,6 +1202,7 @@ var jml = function jml() {
|
|||
} // 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
|
||||
|
@ -1213,12 +1216,13 @@ var jml = function jml() {
|
|||
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,
|
||||
|
@ -1228,6 +1232,7 @@ var jml = function jml() {
|
|||
break;
|
||||
}
|
||||
|
||||
opts.$state = 'attributeValue';
|
||||
elem.setAttribute(att, attVal);
|
||||
break;
|
||||
}
|
||||
|
@ -1251,9 +1256,9 @@ var jml = function jml() {
|
|||
})) {
|
||||
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) {
|
||||
|
@ -1283,10 +1288,14 @@ var jml = function jml() {
|
|||
}
|
||||
|
||||
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
|
||||
|
@ -1412,6 +1421,7 @@ var jml = function jml() {
|
|||
|
||||
case '':
|
||||
nodes[nodes.length] = elem = doc.createDocumentFragment();
|
||||
opts.$state = 'fragment';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1440,6 +1450,7 @@ var jml = function jml() {
|
|||
elem = doc.createElement(elStr);
|
||||
}
|
||||
|
||||
opts.$state = 'element';
|
||||
nodes[nodes.length] = elem; // Add to parent
|
||||
|
||||
break;
|
||||
|
@ -1469,7 +1480,8 @@ var jml = function jml() {
|
|||
|
||||
|
||||
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);
|
||||
|
@ -1487,6 +1499,7 @@ var jml = function jml() {
|
|||
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) {
|
||||
|
@ -1534,10 +1547,14 @@ var jml = function jml() {
|
|||
default:
|
||||
if (Array.isArray(childContent)) {
|
||||
// Arrays representing child elements
|
||||
_appendNode(elem, _optsOrUndefinedJML.apply(void 0, [opts].concat(_toConsumableArray(childContent))));
|
||||
opts.$state = 'children';
|
||||
|
||||
_appendNode(elem, jml.apply(void 0, [opts].concat(_toConsumableArray(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);
|
||||
|
@ -1554,7 +1571,7 @@ var jml = function jml() {
|
|||
|
||||
var ret = nodes[0] || elem;
|
||||
|
||||
if (opts && isRoot && opts.$map && opts.$map.root) {
|
||||
if (isRoot && opts.$map && opts.$map.root) {
|
||||
setMap(true);
|
||||
}
|
||||
|
||||
|
@ -1940,7 +1957,7 @@ jml.toJMLString = function (dom, config) {
|
|||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {JamilihReturn}
|
||||
*/
|
||||
|
||||
|
@ -1951,7 +1968,7 @@ jml.toDOM = function () {
|
|||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
@ -1966,7 +1983,7 @@ jml.toHTML = function () {
|
|||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
@ -1977,7 +1994,7 @@ jml.toDOMString = function () {
|
|||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
@ -1988,7 +2005,7 @@ jml.toXML = function () {
|
|||
};
|
||||
/**
|
||||
*
|
||||
* @param {JamilihArray} args
|
||||
* @param {...JamilihArray} args
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
@ -2028,8 +2045,8 @@ function (_Map) {
|
|||
|
||||
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));
|
||||
|
@ -2069,8 +2086,8 @@ function (_WeakMap) {
|
|||
|
||||
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));
|
||||
|
@ -2097,8 +2114,8 @@ jml.WeakMap = JamilihWeakMap;
|
|||
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, [{
|
||||
|
@ -2116,8 +2133,8 @@ jml.weak = function (obj) {
|
|||
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, [{
|
||||
|
@ -2152,8 +2169,8 @@ jml.command = function (elem, symOrMap, methodName) {
|
|||
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(symOrMap))) {
|
||||
|
|
|
@ -99,12 +99,14 @@ class Command {
|
|||
/**
|
||||
* History command for an element that had its DOM position changed.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*/
|
||||
export class MoveElementCommand extends 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
|
||||
*/
|
||||
export class MoveElementCommand extends Command {
|
||||
constructor (elem, oldNextSibling, oldParent, text) {
|
||||
super();
|
||||
this.elem = elem;
|
||||
|
@ -114,6 +116,9 @@ export class MoveElementCommand extends Command {
|
|||
this.newNextSibling = elem.nextSibling;
|
||||
this.newParent = elem.parentNode;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
type () { // eslint-disable-line class-methods-use-this
|
||||
return 'svgedit.history.MoveElementCommand';
|
||||
}
|
||||
|
@ -167,11 +172,12 @@ MoveElementCommand.type = MoveElementCommand.prototype.type;
|
|||
/**
|
||||
* History command for an element that was added to the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*
|
||||
*/
|
||||
export class InsertElementCommand extends Command {
|
||||
/**
|
||||
* @param {Element} elem - The newly added DOM element
|
||||
* @param {string} text - An optional string visible to user related to this change
|
||||
*/
|
||||
export class InsertElementCommand extends Command {
|
||||
constructor (elem, text) {
|
||||
super();
|
||||
this.elem = elem;
|
||||
|
@ -180,6 +186,9 @@ export class InsertElementCommand extends Command {
|
|||
this.nextSibling = this.elem.nextSibling;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
type () { // eslint-disable-line class-methods-use-this
|
||||
return 'svgedit.history.InsertElementCommand';
|
||||
}
|
||||
|
@ -233,12 +242,14 @@ InsertElementCommand.type = InsertElementCommand.prototype.type;
|
|||
/**
|
||||
* History command for an element removed from the DOM.
|
||||
* @implements {module:history.HistoryCommand}
|
||||
*/
|
||||
export class RemoveElementCommand extends Command {
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
export class RemoveElementCommand extends Command {
|
||||
constructor (elem, oldNextSibling, oldParent, text) {
|
||||
super();
|
||||
this.elem = elem;
|
||||
|
@ -249,6 +260,9 @@ export class RemoveElementCommand extends Command {
|
|||
// special hack for webkit: remove this element's entry in the svgTransformLists map
|
||||
removeElementFromListMap(elem);
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
type () { // eslint-disable-line class-methods-use-this
|
||||
return 'svgedit.history.RemoveElementCommand';
|
||||
}
|
||||
|
@ -317,11 +331,13 @@ 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}
|
||||
*/
|
||||
export class ChangeElementCommand extends Command {
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
export class ChangeElementCommand extends Command {
|
||||
constructor (elem, attrs, text) {
|
||||
super();
|
||||
this.elem = elem;
|
||||
|
@ -338,6 +354,9 @@ export class ChangeElementCommand extends Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
type () { // eslint-disable-line class-methods-use-this
|
||||
return 'svgedit.history.ChangeElementCommand';
|
||||
}
|
||||
|
@ -473,6 +492,9 @@ export class BatchCommand extends Command {
|
|||
this.stack = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
type () { // eslint-disable-line class-methods-use-this
|
||||
return 'svgedit.history.BatchCommand';
|
||||
}
|
||||
|
|
|
@ -72,11 +72,12 @@ const jPicker = function ($) {
|
|||
* 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}
|
||||
*/
|
||||
class Slider {
|
||||
/**
|
||||
* @param {external:jQuery} bar
|
||||
* @param {module:jPicker.SliderOptions} options
|
||||
*/
|
||||
constructor (bar, options) {
|
||||
const that = this;
|
||||
/**
|
||||
|
@ -402,12 +403,14 @@ const jPicker = function ($) {
|
|||
|
||||
/**
|
||||
* Controls for all the input elements for the typing in color values.
|
||||
*/
|
||||
class ColorValuePicker {
|
||||
/**
|
||||
* @param {external:jQuery} picker
|
||||
* @param {external:jQuery.jPicker.Color} color
|
||||
* @param {external:jQuery.fn.$.fn.jPicker} bindedHex
|
||||
* @param {Float} alphaPrecision
|
||||
*/
|
||||
class ColorValuePicker {
|
||||
constructor (picker, color, bindedHex, alphaPrecision) {
|
||||
const that = this; // private properties and methods
|
||||
const inputs = picker.find('td.Text input');
|
||||
|
|
|
@ -261,6 +261,9 @@ export class Selector {
|
|||
* Manage all selector objects (selection boxes).
|
||||
*/
|
||||
export class SelectorManager {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
constructor () {
|
||||
// this will hold the <g> element that contains all selector rects/grips
|
||||
this.selectorParentGroup = null;
|
||||
|
|
|
@ -5078,7 +5078,14 @@ editor.init = function () {
|
|||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Paint box class.
|
||||
*/
|
||||
class PaintBox {
|
||||
/**
|
||||
* @param {string|Element|external:jQuery} container
|
||||
* @param {"fill"} type
|
||||
*/
|
||||
constructor (container, type) {
|
||||
const cur = curConfig[type === 'fill' ? 'initFill' : 'initStroke'];
|
||||
// set up gradients to be used for the buttons
|
||||
|
@ -5101,6 +5108,12 @@ editor.init = function () {
|
|||
this.paint = new $.jGraduate.Paint({solidColor: cur.color});
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {module:jGraduate~Paint} paint
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
setPaint (paint, apply) {
|
||||
this.paint = paint;
|
||||
|
||||
|
@ -5131,6 +5144,10 @@ editor.init = function () {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
update (apply) {
|
||||
if (!selectedElement) { return; }
|
||||
|
||||
|
@ -5189,6 +5206,9 @@ editor.init = function () {
|
|||
this.setPaint(paint);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
prep () {
|
||||
const ptype = this.paint.type;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* including the latest spec changes which were implemented in Firefox 43 and
|
||||
* 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
|
||||
|
|
|
@ -327,7 +327,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
|
||||
|
@ -3865,10 +3865,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
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3877,6 +3873,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;
|
||||
|
||||
|
@ -3891,6 +3893,10 @@
|
|||
_this.newParent = elem.parentNode;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(MoveElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -3956,9 +3962,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 =
|
||||
|
@ -3966,6 +3969,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;
|
||||
|
||||
|
@ -3978,6 +3985,10 @@
|
|||
_this2.nextSibling = _this2.elem.nextSibling;
|
||||
return _this2;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(InsertElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4043,10 +4054,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 =
|
||||
|
@ -4054,6 +4061,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;
|
||||
|
||||
|
@ -4068,6 +4081,10 @@
|
|||
removeElementFromListMap(elem);
|
||||
return _this3;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(RemoveElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4151,9 +4168,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 =
|
||||
|
@ -4161,6 +4175,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;
|
||||
|
||||
|
@ -4184,6 +4203,10 @@
|
|||
|
||||
return _this4;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ChangeElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4360,6 +4383,10 @@
|
|||
_this7.stack = [];
|
||||
return _this7;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(BatchCommand, [{
|
||||
key: "type",
|
||||
|
@ -13363,6 +13390,9 @@
|
|||
var SelectorManager =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
function SelectorManager() {
|
||||
_classCallCheck(this, SelectorManager);
|
||||
|
||||
|
@ -24765,13 +24795,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;
|
||||
|
@ -25177,14 +25209,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
|
||||
|
@ -34420,10 +34455,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);
|
||||
|
||||
|
@ -34441,6 +34484,12 @@
|
|||
});
|
||||
this.type = type;
|
||||
}
|
||||
/**
|
||||
* @param {module:jGraduate~Paint} paint
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(PaintBox, [{
|
||||
key: "setPaint",
|
||||
|
@ -34474,6 +34523,11 @@
|
|||
svgCanvas.setPaintOpacity(this.type, this._paintOpacity, true);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "update",
|
||||
value: function update(apply) {
|
||||
|
@ -34543,6 +34597,10 @@
|
|||
|
||||
this.setPaint(paint);
|
||||
}
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "prep",
|
||||
value: function prep() {
|
||||
|
|
|
@ -2140,9 +2140,9 @@
|
|||
}
|
||||
},
|
||||
"@cypress/code-coverage": {
|
||||
"version": "1.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-1.10.4.tgz",
|
||||
"integrity": "sha512-wIvKn4HEJR2kCiSi0pY1u6IPGG04W7jCJKWVELeIojteHV5d0Jj9dFwwLofwmJr0DWtQsx6lFQfW8NA8z/CUow==",
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-1.11.0.tgz",
|
||||
"integrity": "sha512-+U4AcQvYWIjoZGXT5w03a0eI8yUWG9qdmokmckeGh01pJ8FaH3/WqN6fhhcaSf1g62tTCVF9zJB72eDmrItXQg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@cypress/browserify-preprocessor": "2.1.1",
|
||||
|
@ -5258,9 +5258,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-config-ash-nazg": {
|
||||
"version": "16.5.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-16.5.0.tgz",
|
||||
"integrity": "sha512-1UqkbknTyLQ7AztFSx2SXK+LsKwXKbcGtsvrUDYKg7NmgGIRyDLUGEaJE8coyQkjcyYPNujprgDF1SC9nohmAw==",
|
||||
"version": "17.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-17.0.0.tgz",
|
||||
"integrity": "sha512-q+h62Qc8V/loppSGM5R5Ua89HbgqZm6QvjF3+YMyvMWXMlkXcr1op1pR59QRzIhKo3TpmPSnPAD/Fjz7ZF88AA==",
|
||||
"dev": true
|
||||
},
|
||||
"eslint-config-standard": {
|
||||
|
@ -5519,16 +5519,15 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-jsdoc": {
|
||||
"version": "20.4.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-20.4.0.tgz",
|
||||
"integrity": "sha512-c/fnEpwWLFeQn+A7pb1qLOdyhovpqGCWCeUv1wtzFNL5G+xedl9wHUnXtp3b1sGHolVimi9DxKVTuhK/snXoOw==",
|
||||
"version": "21.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-21.0.0.tgz",
|
||||
"integrity": "sha512-CdLGe2oyw5YAX9rxq9bVz7H2PK+r8PVwdGuvYGMBstpbVD/66yUAgRFQRsJwAsRKLmReo58Lw1jFdNcxdOc4eg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"comment-parser": "^0.7.2",
|
||||
"debug": "^4.1.1",
|
||||
"jsdoctypeparser": "^6.1.0",
|
||||
"lodash": "^4.17.15",
|
||||
"object.entries-ponyfill": "^1.0.1",
|
||||
"regextras": "^0.7.0",
|
||||
"semver": "^6.3.0",
|
||||
"spdx-expression-parse": "^3.0.0"
|
||||
|
@ -8557,9 +8556,9 @@
|
|||
}
|
||||
},
|
||||
"jamilih": {
|
||||
"version": "0.48.1",
|
||||
"resolved": "https://registry.npmjs.org/jamilih/-/jamilih-0.48.1.tgz",
|
||||
"integrity": "sha512-E1hAg7qgdv6tgF5fpOvez/ksZ09/A9zgd429BALiF4aJz/by6bJ4E7FlsQqG3FNwDCdV13F82ZzVv9hyn0VeLw==",
|
||||
"version": "0.49.0",
|
||||
"resolved": "https://registry.npmjs.org/jamilih/-/jamilih-0.49.0.tgz",
|
||||
"integrity": "sha512-0hfLc0fSHeeE8T92RelUEVs7DKjuziSBOE43OHARQ3HAT68YrAvrPEGBQwIcwp/KZac2GABpWvrAYFZ+Fj3MvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"jest-worker": {
|
||||
|
@ -9809,9 +9808,9 @@
|
|||
}
|
||||
},
|
||||
"mocha": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz",
|
||||
"integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==",
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz",
|
||||
"integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-colors": "3.2.3",
|
||||
|
@ -10924,12 +10923,6 @@
|
|||
"object-keys": "^1.0.11"
|
||||
}
|
||||
},
|
||||
"object.entries-ponyfill": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/object.entries-ponyfill/-/object.entries-ponyfill-1.0.1.tgz",
|
||||
"integrity": "sha1-Kavfd8v70mVm3RqiTp2I9lQz0lY=",
|
||||
"dev": true
|
||||
},
|
||||
"object.getownpropertydescriptors": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
|
||||
|
@ -12320,9 +12313,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"rimraf": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz",
|
||||
"integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.1.tgz",
|
||||
"integrity": "sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.1.3"
|
||||
|
@ -12339,9 +12332,9 @@
|
|||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "1.29.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.29.1.tgz",
|
||||
"integrity": "sha512-dGQ+b9d1FOX/gluiggTAVnTvzQZUEkCi/TwZcax7ujugVRHs0nkYJlV9U4hsifGEMojnO+jvEML2CJQ6qXgbHA==",
|
||||
"version": "1.30.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.30.1.tgz",
|
||||
"integrity": "sha512-Uus8mwQXwaO+ZVoNwBcXKhT0AvycFCBW/W8VZtkpVGsotRllWk9oldfCjqWmTnFRI0y7x6BnEqSqc65N+/YdBw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "*",
|
||||
|
|
14
package.json
14
package.json
|
@ -126,7 +126,7 @@
|
|||
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
|
||||
"@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3",
|
||||
"@babel/preset-env": "^7.8.3",
|
||||
"@cypress/code-coverage": "^1.10.4",
|
||||
"@cypress/code-coverage": "^1.11.0",
|
||||
"@cypress/fiddle": "^1.4.0",
|
||||
"@mysticatea/eslint-plugin": "^13.0.0",
|
||||
"axe-core": "^3.4.1",
|
||||
|
@ -140,7 +140,7 @@
|
|||
"cypress-multi-reporters": "^1.2.3",
|
||||
"deparam": "git+https://github.com/brettz9/deparam.git#updates",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-ash-nazg": "^16.5.0",
|
||||
"eslint-config-ash-nazg": "^17.0.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
"eslint-plugin-array-func": "^3.1.3",
|
||||
"eslint-plugin-compat": "^3.5.1",
|
||||
|
@ -148,7 +148,7 @@
|
|||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"eslint-plugin-import": "^2.20.0",
|
||||
"eslint-plugin-jsdoc": "^20.4.0",
|
||||
"eslint-plugin-jsdoc": "^21.0.0",
|
||||
"eslint-plugin-markdown": "^1.0.1",
|
||||
"eslint-plugin-no-unsanitized": "^3.0.2",
|
||||
"eslint-plugin-no-use-extend-native": "^0.4.1",
|
||||
|
@ -160,11 +160,11 @@
|
|||
"frs-replace": "^2.0.1",
|
||||
"gh-badges": "^2.2.1",
|
||||
"imageoptim-cli": "^3.0.2",
|
||||
"jamilih": "^0.48.1",
|
||||
"jamilih": "^0.49.0",
|
||||
"jsdoc": "^3.6.3",
|
||||
"license-badger": "^0.9.3",
|
||||
"load-stylesheets": "^0.9.0",
|
||||
"mocha": "^7.0.0",
|
||||
"mocha": "^7.0.1",
|
||||
"mocha-badge-generator": "^0.4.0",
|
||||
"mochawesome": "^4.1.0",
|
||||
"mochawesome-merge": "^4.0.0",
|
||||
|
@ -179,8 +179,8 @@
|
|||
"regenerator-runtime": "^0.13.3",
|
||||
"remark-cli": "^7.0.1",
|
||||
"remark-lint-ordered-list-marker-value": "^1.0.4",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "1.29.1",
|
||||
"rimraf": "^3.0.1",
|
||||
"rollup": "1.30.1",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-re": "^1.0.7",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
|
|
|
@ -327,7 +327,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
|
||||
|
@ -3865,10 +3865,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
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3877,6 +3873,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;
|
||||
|
||||
|
@ -3891,6 +3893,10 @@
|
|||
_this.newParent = elem.parentNode;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.MoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(MoveElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -3956,9 +3962,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 =
|
||||
|
@ -3966,6 +3969,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;
|
||||
|
||||
|
@ -3978,6 +3985,10 @@
|
|||
_this2.nextSibling = _this2.elem.nextSibling;
|
||||
return _this2;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.InsertElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(InsertElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4043,10 +4054,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 =
|
||||
|
@ -4054,6 +4061,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;
|
||||
|
||||
|
@ -4068,6 +4081,10 @@
|
|||
removeElementFromListMap(elem);
|
||||
return _this3;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.RemoveElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(RemoveElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4151,9 +4168,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 =
|
||||
|
@ -4161,6 +4175,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;
|
||||
|
||||
|
@ -4184,6 +4203,10 @@
|
|||
|
||||
return _this4;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.ChangeElementCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(ChangeElementCommand, [{
|
||||
key: "type",
|
||||
|
@ -4360,6 +4383,10 @@
|
|||
_this7.stack = [];
|
||||
return _this7;
|
||||
}
|
||||
/**
|
||||
* @returns {"svgedit.history.BatchCommand"}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(BatchCommand, [{
|
||||
key: "type",
|
||||
|
@ -13363,6 +13390,9 @@
|
|||
var SelectorManager =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
/**
|
||||
* Sets up properties and calls `initGroup`.
|
||||
*/
|
||||
function SelectorManager() {
|
||||
_classCallCheck(this, SelectorManager);
|
||||
|
||||
|
@ -24765,13 +24795,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;
|
||||
|
@ -25177,14 +25209,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
|
||||
|
@ -34420,10 +34455,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);
|
||||
|
||||
|
@ -34441,6 +34484,12 @@
|
|||
});
|
||||
this.type = type;
|
||||
}
|
||||
/**
|
||||
* @param {module:jGraduate~Paint} paint
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
|
||||
_createClass(PaintBox, [{
|
||||
key: "setPaint",
|
||||
|
@ -34474,6 +34523,11 @@
|
|||
svgCanvas.setPaintOpacity(this.type, this._paintOpacity, true);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {boolean} apply
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "update",
|
||||
value: function update(apply) {
|
||||
|
@ -34543,6 +34597,10 @@
|
|||
|
||||
this.setPaint(paint);
|
||||
}
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "prep",
|
||||
value: function prep() {
|
||||
|
|
Loading…
Reference in New Issue